Joomla cms layout problem

I’m out of Ideas…

When running a Joomla website behind CF and the CF-cache is not enabled everything runs fine.
However when I turn on CF-cache (‘HIT’ in response headers), the page layout gets messed up after a random amount of time, like the css file is not getting received or parsed. This happens somewhere after 2-12 hours after exiting developer mode in CF, with all types of browsers.

Pagerules:
sitename/ Cache Level: Cache Everything, Edge Cache TTL: 2 hours
sitename/site/ Cache Level: Cache Everything, Edge Cache TTL: 2 hours
CF cache settings:
Standard, Browser cache TTL: Respect existing headers
Rocket loader disabled, Minifying disabled.

When the layout is messed up I see no signs of files blocked and/or parse errors in the browser debug tools.

Things I tried:
Reading about all the CF help files regarding CF & Joomla and trying out all tips.
Changing pagerules
Changing the CF caching and speeds settings,
Always use https on/off, automatic https rewrites on/off, etc.
Changing Joomla settings (caching on/of, minifying JS/CSS/HTML on/off, rewrite http to https on/off etc)
Installing Joomla Cloudflare plugin and enabling it
After every single change, switching on developer mode, purging CF and browser-cache and trying again, (been at this for weeks now). I tried more then a hundred combinations in the CF-settings.
Basically if the response header returns BYPASS or DYNAMIC there is no problem. If it returns HIT the layout gets messed up somewhere randomly after 2-12 hours.

I have other Joomla sites behind CF with the same CF-cache/speed settings working without a problem. The small site with the problem has about 10 simple ‘static’ pages, Running Google ads, some text and a few pictures and uses the standard Joomla Template.

You’ve certainly been thorough. Without seeing it ourselves, we can’t help diagnose the problem.

Maybe I found something.
When using the developper tools in a browser, buried in a bunch off Google ads 451 errors there is one 404 (not found) response when the layout of the site is messed up.
It’s a GET link to a css file on the webserver, no additional parameters. When the layout is ok this GET-link gives a 200 (ok) response.

The difference is the Remote CF address in the General header.
With the 404 response it’s 172.67.220.64:443
With the 200 response it’s 104.27.133.17:443

My webserver can ping them both. So why is the browser client not able to retrieve this css file from this server after some time in CF-cache?

172 is a new network and I recall some places having difficulty with requests to that network.

If you look at the response header, what’s the datacenter you’re seeing in the cf-ray header? There should be a three-letter code at the end. Or visit example.com/cdn-cgi/trace for the colo code.

Datacenter is AMS
Forgot to tell, I can ping both addresses from the client side too.

1 Like

Just got the same happening again. It’s not IP related.
This time the 404 response was from 104.27.133.17:443
Another .js file in the same folder path got a 200 response.
So it seems CF just throws away this .css file to early?
The file IS on the webserver, which explains why all is ok, if it’s fetched from the server and not from the CF-cache.

My other Joomla server, which works without problems is from LHR so another datacenter

This problem stays.
Anyone has anymore ideas?

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