• Resolved boyington

    (@bottapress)


    Hi Franck,

    I just upgrade to your brand new 1.8.0 version of Autoptimize and something strange is happening.

    When I activate the CSS optimization, my body background color, which is normally white, tuns to grey !?

    And in fact I see that one of your autoptimize php files adds this:

    body {
    background-color: rgb(230, 230, 230);
    }

    Do you have an idea of what could causes this trouble ?

    thanks

    https://www.ads-software.com/plugins/autoptimize/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Hi bottapress;
    So you were on 1.7.x and upon upgrading to 1.8.0 this happens? Pretty weird indeed. Could I have a look at your site?

    frank

    Plugin Author Frank Goossens

    (@futtta)

    did a quick grep on the plugin’s source to make sure there was no “background-color: rgb” in there, but that is indeed not the case.

    even weirder; that block of CSS, when (aggregated &) minified, would be

    body{background-color:#e6e6e6}

    so I really have no idea what is happening here.

    Thread Starter boyington

    (@bottapress)

    I built two strictly identical test sites in order to try to understand what happens.

    The 1st one, with just the CSS optimization activated on Autoptimize:

    https://autoptimize.wordpress-hebergement.fr

    As you can see, the body background color is #e6e6e6 (go to the bottom of the page to see the background color)

    The second one, just the same without any optimization activated on Autoptimize:

    https://without-autoptimize.wordpress-hebergement.fr

    And here, the background color is white.

    Do you find something in it that could explain the trouble ?

    Thread Starter boyington

    (@bottapress)

    I forgot to answer one of your questions: yes this happened after upgrading from 1.7.x to 1.8.0

    Plugin Author Frank Goossens

    (@futtta)

    OK, I can now confirm this is a bug in the handling of CSS in conditional comments, still searching for the exact root cause & solution. I’ll keep you posted!

    Plugin Author Frank Goossens

    (@futtta)

    OK, I think I have it; in wp-content/plugins/autoptimize/classes/autoptimizeBase.php in the hide_iehacks-function on line 84 could you replace

    '#<!--[if.*?[endif]-->#is',

    with

    '#<!--\[if.*?\[endif\]-->#is',

    Could you see if that fixes the problem for you and confirm if so (or if not)?

    Stupid bug really, don’t know how I missed that … :-/

    Thread Starter boyington

    (@bottapress)

    I confirm it fixes the bug !!

    Thanks for this quick intervention.

    Plugin Author Frank Goossens

    (@futtta)

    Great, 1.8.1 is going out now!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘body background color changed to grey’ is closed to new replies.