• 0
Sign in to follow this  
Followers 0

DMS 2 DMS Child Base Issues


Question

Posted · Report post

Hi guys

 

I have had a bit of an issue with the past two sites I have created using the DMS and would just like to check if I am doing something wrong.

 

I have been using the DMS + DMS Child theme, and setting the site up accordingly and everything added content wise and section wise.

 

I use custom scripts ALOT, and sometimes they cause the DMS editor to stick or hang, so I need to go to the dashboard to use the fallback code editor.  Only when I do so, NOTHING saves, at all.  I try over and over to save the deleted scripts, but upon refresh, they are all still there, and the DMS just permanently hangs.

 

Solution

Copy out all my custom LESS and Scripts, and change the theme to the DMS.  This removes all the custom LESS and CSS, and clears the lot.  Then reactivate the Child theme, and paste it back it, with the problem part of the script removed.  Job done!

 

... not quite

 

When I then go back to the child theme, ALL the settings are lost, for areas like the header and footer, but the body areas seem to remain.  Surely the database entries save the settings I had on the child theme, and reload them upon reactivation of the theme?

 

All the page templates are there so it obviously reads the JSON file, so there would be no point me reimporting from that.

 

Any suggestions or advice on what I am doing wrong would be great, if only to sort the fact I am unable to chance the Scripts/LESS while the DMS is hanging, which is a huge problem for me if I have to re-create the header and footer afterwards.  I would also like to stress this has happened on all the builds I have tried it upon, so it's not a one-off.  Perhaps somebody could try to recreate the hanging DMS locally with a child theme, and see if they are still able to change the fallback code during that time.

Share this post


Link to post
Share on other sites

9 answers to this question

  • 0

Posted · Report post

Just to add to this too, I would be unable to save anything from the child theme at the point that DMS is hanging, so in terms of creating a backup or a child theme with my settings would be out of the question, as I wouldn't back up the theme settings every time I make a script change.

 

Another option would be to know how to disable the custom scripts from being loaded, which could work in allowing my access to the front end editor to delete the scripts.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Ill look into that thanks Dani.

 

I disagree however, it is more the fact there is a single 'conflict' in the js, whatever it may be, which causes the DMS to hang.  The quantity of scripts is irrelevant, more the fact there is an error with one of them, which I am unable to rectify using the fallback option and must resort to changing the theme.

 

It's Nicks Base theme I am using, as directed in the DMS docs.

 

Cheers for your help :)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

When DMS 2.x launched, we updated our documentation to use http://dannyholt.github.io/skeleton/ this child theme instead. The reason for this is Nick no longer supports his PageLines products and the child includes a number of functions and other bits and pieces that aren't really required.

The DMS fallback isn't beyond breaking, both the custom CSS/LESS editor and Custom Scripts panels are for small snippets of code, like  h1 { color: red; }, Google tracking code etc.. It shouldn't be used for mass amounts of CSS/LESS and or multiple scripts.

I don't see the point in using a child theme, if you're going to add your scripts to the scripts option panel ? You may as well just use DMS to begin with. If you're going to use a child theme, which in my opinion you should, then you need to start enqueuing your scripts with the WordPress function. If you do this and the DMS editor breaks, you simply need to open up the functions.php file for your child theme and remove that script.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks Danny I'll bear all that in mind.  Regarding the scripts I do agree that I should be enqueuing them, but the LESS/CSS I stopped using the Child theme for as it doesn't support live previews - which is the bread and butter function of the DMS for me!  The fact you can't do that using a child theme is upsetting.

 

Cheers mate

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Live preview works for me on my skeleton theme.

 

I just this moment added:

 

.masthead-title { color: red; }

 

and then click the live preview command and it worked as intended.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Yes, it works Danny, but only through using the CSS/LESS DMS input section, rather than your suggested style.less implementation through the child theme files.  Unless I misunderstood you.

 

 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Oh yeah, you can not use add CSS to style.css or LESS/CSS to style.less and use the preview. The preview is only through the editor CSS panel. However, I prefer to add my CSS/LESS CSS to the style.less file.

The CSS/LESS editor should really only be used for small changes such as h1 { color: red; } for example. Adding large amounts of CSS/LESS or advanced CSS such as using :before or :advanced should be added to the style.css or style.less files of that child theme.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

If you have the developer plugin you can enable less dev mode
That forces a compile if any less files change

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0