• Resolved Ulrich

    (@grapplerulrich)


    I am having the reverse problem to the past issue.

    When “Aggregate CSS-files?” is enabled wp-includes/css/dist/block-library/style.min.css is not included in the aggregation.

    The excluded files are “wp-content/cache/, wp-content/uploads/, admin-bar.min.css, dashicons.min.css”.

    To figure out where the issue is coming from I disabled all of the plugins and reverted to TwentyTwentyOne. But with TwentyTwentyOne none of the styles are being aggregated. The aggregation works for the inline-styles, just not for the stylesheets. I am not sure what could cause this issue.

    Thank you for any tips or pointers.

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

    (@optimizingmatters)

    Can you share the URL where that is happening Ulrich so I can have a look at the HTML source?

    Thread Starter Ulrich

    (@grapplerulrich)

    Here is the URL https://testing.pszh.ch/new-pro-senectute-kanton-zuerich/
    Basic Auth
    U: optimizingmatters
    P: autoptimize

    I have not disabled any plugins nor activated the default theme but you can see that wp-includes/css/dist/block-library/style.min.css is not aggregated.

    Thank you for looking into it.

    Edit: I forgot I am still waiting for the DNS to be changed for the subdomain. So the only way to access the site is by adding “149.126.4.24 testing.pszh.ch” to the Hosts file.

    • This reply was modified 2 years, 10 months ago by Ulrich.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, had a look, but afraid I have no idea Ulrich; on my own little blog the exact same file is aggregated just fine (add ?ao_noptimize=1 to the URL to see the un-optimized page which does have wp-includes/css/dist/block-library/style.min.css in it) :-/

    Well, one idea; if the file is not readable for the user under which the PHP process runs, then AO will leave it be, but that (a permissions issue) would be somewhat unlikely?

    Thread Starter Ulrich

    (@grapplerulrich)

    Thank you Frank for looking into it. I did a bit more debugging and I found the issue.

    We are using a similar setup to Bedrock where the WordPress files are in a separate subdirectory.

    The full path for WP files is /var/www/html/wordpress/wp/wp-includes/css/dist/block-library/style.css and for the theme /var/www/html/wordpress/content/themes/theme-name/style.css

    WP_CONTENT_DIR is set to /var/www/html/wordpress/content but ABSPATH returns /var/www/html/wordpress/wp/

    That is why the aggregation was working for the theme stylesheets but not for the WordPress stylesheets.

    I think the issue would need to fixed here and checked if the file should be loaded from WP_CONTENT_DIR or from ABSPATH.

    • This reply was modified 2 years, 10 months ago by Ulrich.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    afraid this is too much of an edge case to burden the default autoptimize code with Ulrich, but I will add a filter on that line which would allow you to alter the path as you like (differentiating between core, theme & plugin files), more on this soon ??

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Thread Starter Ulrich

    (@grapplerulrich)

    That’s fine Frank. At least now the edge case is documented incase anyone else comes across this problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Aggregation skips some CSS files?’ is closed to new replies.