• 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]

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    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

    Thread Starter Dennish Karki

    (@karkidennis)

    @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.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    “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?

    Thread Starter Dennish Karki

    (@karkidennis)

    @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.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    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?

    Thread Starter Dennish Karki

    (@karkidennis)

    @optimizingmatters The HTML source is empty.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    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?

    Thread Starter Dennish Karki

    (@karkidennis)

    @optimizingmatters I have the same environment in dev and its working and recently I haven’t installed any other plugins rather than google captcha.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    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

    Thread Starter Dennish Karki

    (@karkidennis)

    @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.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, the cron-job runs asynchronous and as such can should 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?

    Thread Starter Dennish Karki

    (@karkidennis)

    @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”.

    Thread Starter Dennish Karki

    (@karkidennis)

    @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.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    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.jpg

    It is possible you have a (dumb) web application firewall rule that blocks ../ in outgoing HTML.

    frank

    Thread Starter Dennish Karki

    (@karkidennis)

    @optimizingmatters Where Can I find that rules to edit the path? or If I contact with the server can we solve form there?

Viewing 15 replies - 1 through 15 (of 21 total)

The topic ‘Critical css breaking site’ is closed to new replies.