Great tool but having trouble with Cloudflare

Hi,
I fall in love with your tool but take a look at my website mylawards.org its not displaying the mod. Here is the code https://github.com/MYLAwards/website/blob/master/index.html

I am getting this warning message “Missing initial AnyModPageJs data” and not seeing the mod but localhost is working fine

Thank you and welcome! It looks like the mod has a class d-none applied to it, but otherwise it appears to be working correctly. Your page has the bootstrap CSS styling added, so that is causing it to not display.

For consistency between the dashboard mod and your live page, you can add the stylesheet(s) to your mod. In the CSS Assets tab of the editor. Let us know if this helps your issue!

It’s not about d-none thing, I know I am hiding it. Its something with Cloudflare. Look at the div with id anymod-llonkk, its empty. While if I hit netlify site directly, div with id anymod-llonkk has correct html from anymod.

Here is the link to netlify site http://mylawards.netlify.com/

Oh I see, thanks! I had to refresh the original page several times but it finally did throw that error.

Do you have Cloudflare configured to cache your Netlify site? If so, it may have cached a version of the page without the mod information. That would also explain why it’s inconsistent. Clearing your Cloudflare cache (or simply waiting) may fix this. Does that sound like your setup at all?

This is also potentially a fix: adding data-cfasync="false" to the AnyMod script like so:

<script id="AnyMod-script" data-cfasync="false">

We will try to replicate your bug and see if we can figure it out.

This fixed it. Big thank you!

1 Like