CSS styles do not load after captcha enabled

My site https://www.workandliveinchina.com/ does not load correctly (CSS styles faild to load). This happened due to me enabling captcha challenge in Cloudflare firewall rules for all users a while ago.
Has anyone seen such a problem before? How do you fix this?

Your stylesheets seem to be loading, thats rather a JavaScript issue, check out your browser console for details.

1 Like

I just see the errors in the console like this - http://prntscr.com/oalp33

My hosting provider says that there is a syntaxis error that refers to the js code https://www.workandliveinchina.com/wp-content/cache/min/1/cb34225e83c60b9dda947677b793f51c.js which was uploaded for visualization to the 3rd party site - http://joxi.ru/Dr85vpgUo51W5m

I don’t know what this means, or whether any firewalls enabled to cause the issue, or something else, I hope you can take a look at my website and the console/network tab and figure out what the problem is. Check the website now, it won’t load any styles.

You still seem to apply the captcha for these files. Disable these page rules and it should load fine.

I would have thought that passing the CAPTCHA would open it up for all resources on the site. Especially if you configure the challenge with a wildcard.

I would have thought so too, it doesnt seem to be caching either though, so I’d guess page rule.

1 Like

What I have done so far:

Restored database and site version as of June 30
Cleared WP Rocket Plugin Cache
Purged Cloudflare cache
Page Rules are deactivated
Under attack mode is disabled

And nothing helped.

Then I was advised to turn off the WP Rocket and magic - the site works without the plugin.
So what I assume is this happens because of the cache files. I found them in the file manager - http://prntscr.com/oam82v

And my guess is if I remove the cache files and enable WP rocket again it should be alright. But that did not happen. The files are generated again, so then I think on Cloudflare side it is somehow cached. I just need to find a way to remove this unnecessary captcha script from the cache.

1 Like

Its not Cloudflare’s cache, generally the file is cached but even a cache miss returns the captcha. In that case it might be something on your server.

1 Like

I guess I will just wait a little bit and will try to activate my WP rocket again. Without it the site is okay now.

Even on the Speed tab of Cloudflare account you can see it displays the HTML version without styles, while my site is not like that - http://prntscr.com/oamhdn

Well, it seems fixed now.

That speed test doesn’t update after the first time you run it, so it’s not reflective of the current setup.

1 Like

that’s because I disabled WP rocket.
When it is enabled it still causes the issue, So i will leave it turned off for now.

So the issue is with that particular piece of software then.

Generally, no, but it seems to be a bad combination of Cloudflare CAPTCHA and WP-Rocket cache.

Well, if the issue disappears when that particular code is disabled I’d guess the issue is not Cloudflare. The client can fire a challenge, not the server.

If CAPTCHA is disabled, does/did the problem go away?

I understand it is not enabled at all right now. That was my initial suggestion to make sure it is not on.

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.