JS is still not loading with Cornerstone

Hey guys, I was unfortunately sick and therefore I can upload my video only now. Again, it has nothing to do with my hoster or any security settings that the JS will not load, but with Cornerstone. Watch the video and maybe you can see what I mean. With Cornerstone the JS is not loaded, without Cornerstone it runs perfectly on all browsers.

Hello Marc,

Thanks for updating in! I am confuse with this issue because whenever I try to replicate it in my local testing servers, the script is displaying with no issues at all.

I have place the script in a content area element:

I also place it inside the content area modal:

I even did a test using Pro theme. Cornerstone is integrated in Pro theme by the way.
You can check it right here:

As Rad mentioned in his reply (https://theme.co/apex/forum/t/js-is-not-loading-with-cornerstone/53149/12), this issue could be something from the server. It is better that you setup a staging site from a different server or use a local WP installation in your computer and test this issue.

Hope this helps.

Thank you for your prompt reply. I have already reinstalled everything. Cornerstone, WP and xTheme. I can not setup another installation like my server at our hoster. It does not work. In no other container and not with Cornerstone. You saw it in my video. When I paste the JS script into a page created with WPBakery Page Builder, it works fine too. If Cornerstone is disabled. There must be a solution for that?

Hello Marc,

Instead of testing in your site, I have created a staging site for you to test out X, Cornerstone and your script. It is working well in several elements used. You can check it here:

Now if you want to login, please check the secure note so that you can log in, try the page and see that it works in this installation.

Please let us know how it goes.

I believe that it works for you, but not for me. And that’s the problem. I tested the JS on another company site of mine and it works. But, the site has the same settings and the same hoster as the fitschlankundsexy.de. That’s why it can not be the hoster. It does not work on the installation with Cornestone. and there has to be a reason for that.

Hello Marc,

The staging site I’ve set up is for us to test the script. And it just works.

Now your other site does not work in our browser. It is showing the same JS error:

Refused to load the script 'https://www.gz-sanguinum.comjs/jquery.js?ver=4.9.9' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' ". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

jquery-migrate.min.js?ver=1.4.1:2 JQMIGRATE: Migrate is installed, version 1.4.1
(index):1 Refused to load the script 'https://app.getresponse.com/view_webform_v2.js?u=Srsk&webforms_id=SQmP1' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' ". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Please switch to Twenty Nineteen theme and disable Cornerstone. We’d like to see if we are still getting the same JS error.

Regards.

ok, I can do that, but only tonight! I will contact you when I have tested it.
The JS works but with me on all devices!

Hey Marc,

Please inform us when you switch the theme and turn off Cornerstone so that we can check it at the same time.

Cheers.

Ok, but I thought you already did that!

Hello Marc,

We always ask permission or let the user disable or switch themes to avoid any conflicts and mishaps.

I have tried to check your other site and the script is now showing up with X and Cornerstone active.

Hope this helps.

No, unfortunately that does not help, because I do not know why the JS loads on one side and not on the other. I will try this time with the theme change.

Ok, I disabled xTheme and Cornerstone and enabled Twenty Nineteen. Look at it. It works fine on ALL devices and all browsers. It loads and I can see it. Here again the link to the test page.

https://www.fitschlankundsexy.de/optintest/

Please tell me when I can switch it back to X and Cornerstone.

Hi Marc,

I’ve been looking on that latest sample and it’s not working there either. Would you mind providing a screenshot of what you’re seeing?

I see 32 errors on that sample and not X theme or cornerstone related.

Perhaps you can contact the author of the code?

Thanks

I can see that…

You can not see xtheme and cornerstone, because everything is disabled. it’s just the normal wp theme

Hi Marc,

Sorry for the confusion, what I’m referring is there is no X theme and cornerstone in your provided sample while the issue is still there. And in my conclusion, it’s not theme or cornerstoner related since it’s still the same.

I’ll continue checking to see if I can reproduce it on other devices.

Thanks!

hey Rad, it works for me and everyone else on all devices. we tested it. it also works with xtheme. just not with cornerstone. have you seen the video? I showed it live.

Hey @Marc,

Thanks for creating a video. I saw that the form worked when you deactivated Cornerstone. But, that is not the same in my test. Upon checking, Cornerstone is still deactivated in your site yet your form doesn’t display (see my screencast in the secure note). Like Ruenel, I inserted the same script in my test site and it works.

The issue here is because of Content Security Policy which is most probably setup on the side of your web host. I have read already that you talked with your web host. But, I hope you understand our side also that this is the result of our investigation. Please take a close look at the error in the secure note.

For more details about Content Security Policy, please see https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP. If you read the article, you’ll know that a meta code is responsible for that and I found the said code in your site.

Please contact your web host again if they have a system that adds that code automatically. If that code is not from them, that could be added by a third party plugin or some custom functionality in your WordPress install.

Our products will not add such a code in your site because they do not modify security settings nor setup security related stuff.

By testing your code in our test sites and found that it’s working, that alone tells us that there’s no problem or conflict with Cornerstone because otherwise, the issue would happen on our end too.

Thanks.

Hello Christian, thank you for your answer. I’d like to say once again that the JS works flawlessly on another website of mine. This website runs on the same hoster, the same server with the same settings. And with us the script WITHOUT Cornerstone is very well displayed. And on all sides! I’ve disabled ALL plugins in a test well before our time. All! Then ONLY I activated Cornerstone and the JS was not loaded. I deactivated it again and it was loaded again. Afterwards I activated every single plugin and there were no problems. Until I activate Cornerstone again. Then I had the same problem again. Thus, I exclude the server. I exclude all plugins. And can only repeat myself. It’s on Cornerstone.

So, I’ve disabled ALL plugins again. Look if it is different now in your test.

I’ve seen the video of you, you have to accept the Privecy policy, because there are no scripts loaded on the site. No codes, no nothing. Can that be the problem why it does not work for you?