Can't save custom js

Hiya,

For some reason I am unable to save changes to the custom js on my home page. I have tried disabling (and clearing out caches) WP Super Cache and Autoptimize but still no luck. I can modify the global js fine and also edit the content of my home page.

Can someone point me in the right direction?

Many Thanks

Hello There,

Thanks for posting in! This seems like an issue caused by a cache. Did you already cleared or maybe temporarily disable caching and do another round of test again.

There could also be a chance that there is a JS error on the page which is why your custom JS code is not working. Could you please provide the url of your site and maybe the access credentials to so that we can take a closer look?

Please let us know how it goes. Thank you in advance.

Thanks for your help. I’ve added my login credentials to my initial post. I’ve also just noticed that I’m having the same issues with the page specific custom css.

Thanks
Rob

Hello Rob,

It is best that you disable the WP Super Cache and Autoptimize plugin. Caching plugins are best turn on when you are done creating or developing your site. This will let you see real time changes in your front end especially if you won’t want to adjust things and your customizations and settings were not yet fixed.

I have temporarily deactivated the plugins and my custom css is now showing in the front end. By the way, I noticed that you also inserted duplicate custom JS. The one is in Theme Options > Custom JS and the other one is in Cornerstone’s Page custom JS.

Please let us know how it goes.

Thanks for your help. Yeh I noticed the duplicate custom js, so I have been trying to comment it out, which is how I noticed the saving issue.

After you deactivated the plugins I commented out the js and that seemed to save ok. I then enabled both plugins again and one of their caches must have replaced the most recent cornerstone version, so the custom js was back to how it was before…

I then deactivated both WP Super Cache and Autoptimize but I still wasn’t able to save changes to the custom js. I have now removed both plugins and still have the same problem.

Am I missing something? Did you do anything else, other than deactivate those 2 plugins in order to get it to work?

Thanks!

Hey There,

With the said plugins deactivated, I added a line in your custom JS. I was able to save my changes with out any issues. I even changed your custom css and save it as well.

Please clear your browser caches and test your site again.

Thanks for your help. However, that line is in the global js, not the home page custom js. I’ve tried again and am still unable to save any changes in the home page .js. Have you had any success modifying that?

Thanks!

Hi there,

You’re right, it says success (and through JSON data too) but the added content isn’t being saved. I couldn’t find any error, please provide your FTP login credentials too. I may able to find something there.

Thanks!

Awesome, thanks. I’ll add it now

Hi there,

Thanks, I tried and it doesn’t log any error or warning. But, I did create a new page and loaded your home page content and it works okay. The JS section is saving, plus the preview loads faster. Could you try checking the HOME X page? You can assign it as your home page too.

Thanks!

Hiya,

So the HOME X page seemed to work fine initially. I then added the Yoast SEO information and assigned it to be the home page. Since then I haven’t been able to save the js… Any ideas?

Thanks!
Rob

I also tried creating a new page (Test) modifying the js and then setting it to the front page (as I tried with HOME X but without any Yoast edits). Unfortunately I had the same results. So I’ve set the front page back to HOME X, and the test page to unpublished for now.

Thanks
Rob

Hey There,

Could it be your Yoast SEO plugin that is causing an issue? Maybe you can deactivate this plugin and test your site again. A few versions back, there an issue between Yoast SEO plugin and the theme, maybe it has resurface again.

Please let us know how it goes.

Yep. Looks like it was Yoast. I disabled it and I could save the custom js again. Re-enabled Yoast and I could no longer successfully save the the js. I’ve tried reinstalling Yoast, but the results have been the same.

Thanks for your help :slight_smile:

You’re welcome! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.