• Resolved sl-immigration

    (@sl-immigration)


    Subpages of site were throwing a 500 server error. Checked logs and saw the following error:

    PHP Strict Standards: Only variables should be passed by reference in /wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 262

    Turned off CSS optimization and pages loaded correctly.

    What should I do to get CSS optimization working again? Thanks!

    https://ww.wp.xz.cn/plugins/autoptimize/

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

    (@futtta)

    well, the strict standards entry is a notice, not an error, and is not what is causing your 500 errors. the reason for that notice has been fixed on the development version, cfr. https://github.com/futtta/autoptimize/blob/master/classes/autoptimizeStyles.php#L290

    now as far as your 500 server errors are concerned; there is specific CSS on you subpages which, once aggregated, is causing the minimizer AO uses to crash when trying to minimize. You can either try to switch to the legacy minifier (cfr. FAQ) and see if that works or you can try to exclude the offending CSS from CSS optimization.

    hope this helps,
    frank

    Thread Starter sl-immigration

    (@sl-immigration)

    Hi Frank,

    Thanks for this information. I switched to the legacy minifier and now the subpages work, but it is breaking some of the CSS on my subpages. Should I just exclude that from the optimization?

    Also, how can I tell what the offending CSS was?

    Plugin Author Frank Goossens

    (@futtta)

    Should I just exclude that from the optimization?

    yeah, standard troubleshooting as per the FAQ applies 🙂

    Also, how can I tell what the offending CSS was?

    trial & error, excluding one CSS-file after the other until it works.

    have fun,
    frank

    Thread Starter sl-immigration

    (@sl-immigration)

    Ok, got it. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Error breaking pages when CSS optimization is on’ is closed to new replies.