Cornerstone custom js saving issue

I have been through one of your same ticket which was not much useful though, I am unable to save js for only homepage all other pages are working fine and I can save custom js. Could you find the error, because I cannot see any error but I cannot even save the changes I have done in the js editor.

Hi There,

Thanks for writing in!

Can you please provide us the JS code you are adding to the custom JS and your website details so that we can have a look on to the issue.

Please provide following information:
Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • JS Code
    All the best!

Thanks

if(cflag){
  var url = "http://www.enhancier.com/thank-you/";
  jQuery('.request-demo-cp').val("Sending email...");
    jQuery.ajax({
          type:"POST",
          url:'http://www.enhancier.com/wp-content/themes/x-child/requestdemosolutions.php',
          data:{ name: name, email:email, phone_number:contactnumber, solutions:solutions, message:message, countrycode:countries, countryname:countryname},

I am just trying to change the URL variable and I want change http:// to https:// to the url.
I am sending you the Login credentials in next note.

Hi there,

The problem seems not to be isolated only from the homepage, I could not change the JS in the Theme Options either. I see that you are using an old version of the theme with Cornerstone version 2.1.7 which is not compatible.

Please backup your website completely and update the theme to version 5.2.5.

Thank you.

Hi,

I have updated the theme but still I can’t update the cornerstone content js code.Could you please check once.

After updating the x theme I am facing another problem where my product page is not loading except the header and also this error

The preview was unresponsive after loading. This is most often related to a plugin conflict or aggressive page cacheing.

Though I don’t have any plugin for caching. I need an immediate response please check.

Thank you.

Hey @EnhancierCx,

This looks like a combination of issues. Please try updating ConvertPlug to the latest version first. Then, give us cPanel access so we could check your config.

Also, backup your site first because we don’t have a backup service.

Thanks.

I am afraid that I can’t update the convertplug as I am using php 5.6 version and I cannot update PHP as I am using shared hosting. Could you suggest something else?

I’m sorry but I could not suggest anything other than the errors I see. It needs to be done in order to rule it out if the issue persists. If this cannot be done, regretfully, we cannot continue troubleshooting.

Thank you for understanding.

Hey Christian,
Thanks for your suggestion but can you just change the homepage js, if the convertplug is what you need to update I have tried deactivating the plugin and then tried but it didn’t work and I think if you could just tell me in which file/database variable the js is stored so that I can change js by myself. BTW Product page is working fine now.

Hi there,

This is common issues in shared hosting since the resources are very limited and the new version has more features and may require a bit of processing power. But I’m not saying it’s the real reason.

Can you restore it back to older version of X theme and cornerstone? The issue I’m getting now is javascript error originating from Cornerstone Library Carousel plugin, and it’s not incompatible with the latest version which is causing issues in the builder. Plus, I see another set of errors after deactivating that plugin, so please disable the plugins as other errors are related to jQuery easing/animation which could be from those. Or please let us deactivate them after getting a backup of your site.

Thanks!

Hi Rad,

I have restored old version of X theme and cornerstone and now, I tried editing the homepage but I see that the element missing is shown in the editor so I am little afraid that if I save it, should not affect the page. I have taken the backup, you can go ahead and try to update the homepage js edit.

Hey @EnhancierCx,

I was able to save your home page JS when I purged all caches and disabled caching in WP Fastest Cache.

The issue might have stemmed from combining JS. Minifying CSS could potentially cause issues also. You will need to exclude all X and Cornerstone from minification and concatenation. You will need to ask the caching plugin developer how to exclude theme and plugin resources.

Thanks.

Hi,

I cannot see the homepage content. Where did it go?
See the Screenshot, I don’t see anything in front-end too.

Hey,

I have uploaded the page template from my localhost and now I think I cannot shift to the cornerstone old version if I do that I am losing my homepage content after saving it. The only way to save the custom js is I have to use old conrnerstone version for home page. Why is this only limited to homepage other pages are not being affected.

Thank you.

Hey @EnhancierCx,

When I investigated, I see you’ve reverted to the old X and Cornerstone version. I’ve added a script in your home page JS and at first, it did not save. I then proceeded to clear cache as I’ve said previously and tried adding a script again and after this, it worked.

The lost of content might have stemmed from purging the cache. With that said, all of this issue including the custom js saving issue might be the result of caching. Would you mind doing the following:

  1. Completely uninstall your caching plugin. Please contact the plugin developer for the full instruction
  2. Deactivate all third party plugins while we troubleshoot to ensure there’s no conflict.
  3. Update X and Cornerstone to the latest version
  4. Give us cPanel access.

Thanks

Thank you Christian,

I will follow the instructions as you said, but some things you have to do.

  1. I will deactivate and delete the cache plugin.
  2. You can deactivate all plugins except Convertplug and Slider Revolution ( If it’s gonna take short while you can deactivate them too ) for troubleshooting.
  3. I am using updated Cornerstone version. Need to update the X theme ( Zip file already available on the hosting ) you can do this.
  4. Find Access

Hi there,

Could you try it with another browser or device? It loads okay from my end

But yes, it has loading issue in my firefox, but it displays a popup instead of missing elements. Could you try it in chrome?

Thanks!

Yes, It is because I have uploaded the template copy from the replica of live site.

Hi There,

Your version of X and Cornerstone is not compatible. Since you already have the latest version of Cornerstone, please update your X Theme to the latest version as well (v5.2.5). Please also delete the old Cornerstone version you have.

Remember to clear all caches (plugin, server-side, CDN, and browser’s cache) after updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

Let us know how it goes,
Cheers!