The discussion revolves around a Discourse site experiencing errors due to Cloudflare Rocket Loader. Faizan_Zahid initially reports an “Uncaught ReferenceError: Discourse is not defined” error when accessing certain topics on mobile devices. Falco identifies the issue as being caused by Cloudflare Rocket Loader, which is unsupported by Discourse.
Faizan_Zahid attempts to resolve the issue by setting the Cloudflare DNS to “DNS only” and disabling Rocket Loader, but the error persists. Falco advises that the change may take a few hours to take effect.
After making the necessary changes, Faizan_Zahid reports additional errors, including a UI break and an “Uncaught (in promise) no-response” error related to Google AdSense. Faizan_Zahid later reports an “unsecured error” after re-enabling the Cloudflare proxy.
Falco attributes the “unsecured error” to a missing certificate during installation and provides a link to a guide on setting up HTTPS support with Let’s Encrypt. Faizan_Zahid ultimately resolves the issue by re-enabling the Cloudflare proxy and disabling Rocket Loader, and expresses gratitude for the assistance.
Also, jsut tested and confirmed it does not happen if i goto my site and search for this topic “FAQ” and click on it, but if i directly copy the URL of this topic and open it directly in browser or click on a link (on some other external site, not on discourse, then this error comes).
You are using Cloudflare Rocket Loader, which is unsupported.
Please go to the DNS entry for Discourse in your Cloudflare admin panel and make the cloud gray. Discourse will randomly fail with an orange cloud, as you can see.