2

Cloudflare Rocket loader Causing js errors ($ not defined). Issue is only on one page. Other than that site is working fine. I am using osclass CMS for my project. It has a subscription functionality which have a large hidden field. When rocket loader reaches that field it just crashes and does not add its nonce in script tag which is causing this issue.

Can anyone tell me how to fix it.

Script Link: Rocket loader

Input field

Usman Ashraf
  • 21
  • 1
  • 5
  • Welcome. Could you please share the relevant code here _in your question_, not in the comments? Thx – brombeer Oct 15 '18 at 06:33
  • I am not familiar with Rocket loader, is the `$` for Jquery? Is Jquery In no-conflict mode? `(function($){ })(jQuery);` – ArtisticPhoenix Oct 15 '18 at 06:36
  • Rocket loader is a cloudflare optimization script which reads script tag and load them with deffer or async optimization. My page have base64 encoded large hidden input field. Which cause that script to crash. – Usman Ashraf Oct 15 '18 at 06:48
  • Script Link: https://ajax.cloudflare.com/cdn-cgi/scripts/2448a7bd/cloudflare-static/rocket-loader.min.js – Usman Ashraf Oct 15 '18 at 06:54

1 Answers1

-1

did you import jQuery? if not please include this

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
shanthan
  • 554
  • 8
  • 8