• Resolved Roman

    (@roman17trushanov)


    Hi there,

    We are having an issue with Autoptimize calling for a non-existent CSS-Stylesheet during the rendering-process. The custom plugin “l1-redirect”, created by our developers, is present on many of our WP-domains.

    We use WP-Rocket for CSS-Optimization and Autoptimize for JS-Optimization.
    Therefore, I find it quite odd that as soon as I activate Autoptimize, which is NOT in charge for CSS-Optimization in our case, for some reason it originates a call for the non-existent file ../wp-content/plugins/l1-redirect/css/l1-redirect.css?ver=1.0.0

    The domain in object is https://www.mietrecht.com/, but many more WP-installations of us are affected by the very same issue.

    Is there anyway to prevent Autoptimize from calling this “ghost” file?

    • This topic was modified 5 years, 1 month ago by Roman.
    • This topic was modified 5 years, 1 month ago by Roman.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    based on the HTML source of that site, the culprit is wprocket in this case Roman, see the “data-rocket-async” attribute;

    
    <link rel='preload'   href='https://www.mietrecht.com/wp-content/plugins/l1-redirect/css/l1-redirect.css?ver=1.0.0' data-rocket-async="style" as="style" onload="this.onload=null;this.rel='stylesheet'" type='text/css' media='all' />

    additionally when loading the site with ?ao_noptirocket=1 appended to the URL (which disables both AO and WP Rocket) I still see the stylesheet in the HTML source:

    <link rel='stylesheet' id='l1-redirect-css' href='https://www.mietrecht.com/wp-content/plugins/l1-redirect/css/l1-redirect.css?ver=1.0.0' type='text/css' media='all' />

    hope this clarifies,
    frank

    Thread Starter Roman

    (@roman17trushanov)

    Hi Frank,

    I wonder why https://webpagetest.org/ is reporting a 404-error for https://www.mietrecht.com/wp-content/plugins/l1-redirect/css/l1-redirect.css?ver=1.0.0
    only when AO is active in combination with WP-Rocket. When AO is deactivated, there is no error message of this sort. Do you have any idea why this is happening?

    Thread Starter Roman

    (@roman17trushanov)

    Moreover, the issue persists even when I deactivate WP-Rocket!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    the base issue is you have this in your unoptimized HTML:

    <link rel='stylesheet' id='l1-redirect-css' href='https://www.mietrecht.com/wp-content/plugins/l1-redirect/css/l1-redirect.css?ver=1.0.0' type='text/css' media='all' />

    so if not needed you’ll have to not enqueue (or dequeue) that CSS?

    Thread Starter Roman

    (@roman17trushanov)

    Thank you again, I am going to ask to my team why is that!

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

The topic ‘Autoptimize is calling a non-existent CSS-File’ is closed to new replies.