Cannot delete or edit page's JS code

I have page specific JS code that I cannot change or delete. I developed most of the site local, then used Migrate DB Pro to move the site to production. Now, when I try to edit or delete the script, it doesn’t change. The page is here: https://pbjmarketing.com/

I’ve tried duplicating the page to see if there was some corruption in the serialized data, but that didn’t work either. Please take a look and let me know what can be done.

Thanks.

Hello There,

Thanks for writing in!

Which code you are referring to?
#1

jQuery('.services select > option:first').addClass('hidden');
jQuery('.budget-range select > option:first').addClass('hidden');
jQuery( ".hidden" ).prop( "disabled", true );

#2

//
// No need to add script tags
// here; simply get started
// by writing JavaScript!
// Remember to save your
// changes to see them :)
//
jQuery("#modal-form-submit").after("<span></span>");
jQuery('.services select > option:first').addClass('hidden');
jQuery('.budget-range select > option:first').addClass('hidden');

jQuery( ".hidden" ).prop( "disabled", true );

jQuery(".services-link").wrap("<a href='services-2'></a>");

The #1 can be removed or change in the theme options custom js section (http://prntscr.com/evswzb) or in the customizer, Appearance > Customize > Custom > Edit GLOBAL Javascript

The #2 can be change in Cornerstone custom js section, Custom JS

Hope this helps.

Sorry, no this does not help. I know how to add or edit the JS. In this case, I edit the code, hit save, then exit to dashboard.

Then if I edit the page again, the code is the same as before the edit. Can you login and let me know what you think?

Hi There,

I can confirm the issue on your end. Could you please try deleting the Cornerstone plugin and then re-install it again by head over to X -> Overview section.

Then make sure to purge your server cache and test this issue again.

Let us know how it goes.
Thanks!

I’m not using Cornerstone, I’m using the Pro theme.What else can I try?

Hi there,

Before we delve into the admin section to investigate we need you to test the steps below and get back to us with the result:

  1. Ensure everything is up to date according to our version compatibility list here. Please follow the best practices when updating your theme and plugins. Click here for more information.
  2. If you’re using a CDN, please clear the CDN’s cache and disable optimization services.
  3. Test for a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Also, give us the name of the page that you have the problem of JS code not changing after the save.

Thank you.

I deactivated all plugins, fixed the code and re-enabled the plugins. I’m not sure which plugin caused the problem, but I’m just glad I was able to fix the JS.

Hi there,

Glad it’s okay now, the issue might be due to the combination of two or more plugins which could be harder to trace.

Thanks!

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