Critical css breaking site
-
Hello I have this site and it is breaking( White screen) When I turned on the critical css.
The page I need help with: [log in to see the link]
-
that’s unexpected and unfortunate.
some questions to understand what is happening;
* do you also get the white screen when “critical CSS” is not active and “inline & defer” in Autoptimize is on?
* can you check the php-errorlog for relevant errors @karkidennis ?frank
@optimizingmatters
No I didn’t get errors while critical css is not active.(which inline and defer?)After active I get this http://prntscr.com/nafnwd and there is nothing in error log too.
-
This reply was modified 7 years, 1 month ago by
Dennish Karki.
“inline & defer” is an option in Autoptimize’s CSS options, can you try enabling that but keeping critical CSS off?
is the white screen what you see on the front-end or on wp-admin?
@optimizingmatters Is this the setting you talking?
http://prntscr.com/nagu6f is it then yes it breaks the site as same as Critical Css does. The error is in frontend.OK, so that implies the problem is not with “critical CSS” but rather with Autoptimize itself.
When you have that white page on the front-end and you look at the HTML source, is that empty or is there HTML in there?
@optimizingmatters The HTML source is empty.
That leaves us with not a whole lot to go by …
I’m starting to suspect some kind of conflict here, could you try disabling/ reenabling plugins one at a time and/ or you briefly switched themes to see if we can identify a culprit?
@optimizingmatters I have the same environment in dev and its working and recently I haven’t installed any other plugins rather than google captcha.
well, that makes it an even bigger mystery .. I would still advice to do the plugin dance though, could you?
also: can you (ask your hoster) to re-check the PHP errorlog (on the server), in case of white screens there almost always is _some_ info in there? and while you’re at it; ask them if they have some kind of web application firewall (mod_security or similar) that blocks outgoing HTML, it’s not impossible this is what’s happening ..
frank
@optimizingmatters It is working for now without doing anything but soem of the pages are down like https://www.pjponline.com/contact/ and this is exactly what is happened before.
-
This reply was modified 7 years, 1 month ago by
Dennish Karki.
well, the cron-job runs asynchronous and as such
canshould not impact what happpens on the front-end, so I would doubt it being due to the cron-job, esp. as the problem was even there when you had critical CSS off and only had “inline & defer” in AO itself on?@optimizingmatters It is working for some pages and some of the pages are down like https://www.pjponline.com/contact/ and this is exactly what is happened before.
When I turned on the “inline css” the whole site goes down but not in “critical css”.
@optimizingmatters As I am testing I have added the manual conditional css for page http://prntscr.com/nc5if5 and the contact page is also working. The page which has no critical css crawled is breaking.
OK, try editing that rule’s critical CSS, changing paths in there that contain
../to a path without that directory traversal thing, e.g./wp-content/theme/mytheme/css/../images/picture.jpg
becomes
/wp-content/theme/mytheme/images/picture.jpgIt is possible you have a (dumb) web application firewall rule that blocks
../in outgoing HTML.frank
@optimizingmatters Where Can I find that rules to edit the path? or If I contact with the server can we solve form there?
-
This reply was modified 7 years, 1 month ago by
The topic ‘Critical css breaking site’ is closed to new replies.