Jump to content

Archived

This topic is now archived and is closed to further replies.

bloom1creative

DMS Child Base Issues

Recommended Posts

bloom1creative

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.


Many thanks

 

Rob1n

Share this post


Link to post
Share on other sites
bloom1creative

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.


Many thanks

 

Rob1n

Share this post


Link to post
Share on other sites
Danny

Hi,

 

What child theme are you using ?

 

Your issues seems to come from the fact that you use a lot of scripts. If you do then you should enqueue them instead of using the custom scripts option.

 

http://codex.wordpress.org/Function_Reference/wp_enqueue_script


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
bloom1creative

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 :)


Many thanks

 

Rob1n

Share this post


Link to post
Share on other sites
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
bloom1creative

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


Many thanks

 

Rob1n

Share this post


Link to post
Share on other sites
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
bloom1creative

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.

 

 


Many thanks

 

Rob1n

Share this post


Link to post
Share on other sites
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Simon
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

  • Similar Content

    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a few weeks ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

    • Justin Taylor
      By Justin Taylor
      I originally purchased, I believe, a 3 site licence for DMS2. The new account interface does not reveal any of this information.
      How do I know how many licences I am entitled to? How do I reset one for a new website? All it says now is that I don't have any Pro licences?
    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
    • Steve Webb
      By Steve Webb+
      I am having an issue with DMS editor not loading.  Just keeps spinning and spinning.
      Have tried several things - Logged in and out, cleared cache, deactivated all plugins, but the issue persists.
      I even had our host restore from a backup a week ago, when I know it WAS working, as I edited a text box on the homepage.  The restore from backup didn't help either.
      Also, the front end of the site shows that the site is framed, or boxed now (whatever you call it), instead of full width as it was previously (last week).
      Dev console shows that there are php errors in Google maps - file is attached.
      Can someone please help?  Not sure what else I can do here...
      Thanks in advance.
      -Matt

    • JawDesigns
      By JawDesigns
      Hi everyone,
      Flywheel have reported errors on my clients site 'www.racewaredirect.co.uk' and it's not loading. Can someone please provide some information on how to fix this? The site has never experienced these issues before.
      Thanks,
      James Wilson
×