• Resolved zatur90

    (@zatur90)


    Hi, does anyone know what YUICSSMIN_PRESERVE_CANDIDATE_COMMENT is? I got a problem with a site when I use Autoptimize to combine all css files, there is a code that breaks my site. This line of code:

    /*___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_1___

    this comment is not closed and it breaks all css from below until the next comment. Need to figure out where that particular line of css is in order to remove it or change it.

    I’ve also tried using a “Remove critical CSS generator” / Inline and Defer CSS in order to remove all of the comments etc. from the combined CSS file. but no luck. 🙁

    The page I need help with: [log in to see the link]

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

    (@optimizingmatters)

    hey @zatur90;
    looks like one CSS-file is breaking the minifier (yuicssmin) you could try to exclude your original CSS-files one by one, to try to work around this issue?

    hope this helps,
    frank

    Thread Starter zatur90

    (@zatur90)

    Hi Frank,

    I would like to give your solution a try. But how do I figure out the names of the original CSS-files?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    have a look at the HTML source of https://www.amerk.dk/?ao_noptimize=1 (the ?ao_noptimize=1 part disables optimization), in there you’ll see e.g.

    <link rel='stylesheet' id='divi-style-css' href='https://amerk.dk/wp-content/themes/tobias-magnussen/style.css' type='text/css' media='all' />

    so you can exclude that by adding themes/tobias-magnussen/style.css to AO’s comma-separated CSS optimization exclusion list.

    try to do that for each linked CSS-file in the HTML source until /*___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_1___ is no longer in your autoptimized CSS (also try unticking the “also aggregate inline CSS” option to make sure the problem is not with the inline CSS).

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

The topic ‘autoptimize breaks css’ is closed to new replies.