Standalone Cornerstone (6.14) custom Global Javascript disappears

Sorry for another post, I’m just having another issue with the same site I just posted about.

When I add any custom Global Javascript, I can see it gets applied to the page when I preview the page via the Console, but it disappears from the Global Javascript if I reload the editor.

Even though it doesn’t show up in the Global Javascript anymore, it still appears to have been applied to the page and is functioning on the site. Any ideas? Thanks!

Hello @instyletech,

Thanks for writing in! Do you have a caching or optimizing plugin? To better assist you with your issue, please provide us access to your site. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hi @ruenel, since you’re taking a look at my other issue, I thought I’d chime in here to say I’ve done all the above, and still, my Global JS disappears. I’ve added a secure note here as well with login creds.

Thanks again!

Hello @instyletech,

Are you referring to this JS code?

var goBtn = document.getElementById("goBtn");
var monthlymenu = document.getElementById("monthly-menu");

goBtn.onclick = function() {
  window.location = monthlymenu.value;
}

var goBtn2 = document.getElementById("goBtn2");
var yearlymenu = document.getElementById("yearly-menu");

goBtn2.onclick = function() {
  window.location = yearlymenu.value;
}

I am also looking for it and I could not find it anywhere. When viewing the page, it is there at the bottom. It is best that you create a staging site which I have indicated in your other thread so that we can fully investigate the issue.

Best Regards.

Hi @ruenel, that’s the issue I’m troubleshooting. This is code that I originally put into the “Global Javascript” area in Cornerstone. Any Javascript I put there is applied and becomes active, and then completely disappears from the Global JS. You can see it in the source. This is a bug with the Global JS.

Hi @instyletech,

I have checked and found the issue while adding the JavaScript code in the Global JS. I would suggest you please copy your live site to a staging server so we could troubleshoot freely without breaking your live site.
And give us access to the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi @tristup, I created a staging site and added credentials to a secure note. Thanks.

Hey @instyletech,

We’re very sorry for the back and forth here. What you’re experiencing looks like a bug as I’ve replicated what you described in my test site that is adding scripts won’t save. Scripts added using the previous version of Cornerstone remain in the database but can’t be read in the Global JS field that’s why you still see the old code.

The solution for now is to downgrade Cornerstone to the Previous Version (currently 6.0.8.) available in your Themeco Dashboard > License.

image

I’ll post this case in our internal issue tracker so this will be queued for investigation.

Please stay tuned for updates.

Thanks.

Thanks, I’ll do that.

You’re most welcome.

Hi @ruenel, how are the updates coming?

Hello @instyletech,

We are still in beta. Our developers are currently testing. We do not have an ETA yet. Kindly check out our Status Report here:

Best Regards.

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