Error: When using [Enable minification of CSS files] + empty CSS files
-
I’ve found something disturbing when using the plugin WP-Optimize v3.7.1.
(on WordPress 6.7 / PHP 8.3.11 / MySQL 8.0.16)When using the option [Enable minification of CSS files], if one of the CSS stylesheets enqueued is empty (or contain only comment, but no CSS code), this error message appears in the of the page. In this example, my CSS file is named [xxx.css].
<!--ERROR: WP-Optimize Minify was not allowed to save its cache on - wp-content/cache/wpo-minify/1732442992/assets/wpo-minify-header-xxx.min.css-->
<!--Please check if the path above is correct and ensure your server has written permission there!-->It’s disturbing because it sounds like there was a permission problem, but in fact, it’s simply that the CSS file is empty.
=> Can anyone confirm the problem?
PRECISION 1
To be precise, if the CSS file contains the code [A], the file WILL BE considered empty, and the error message will appear. The error message WON’T appear when the file contains the code [B], because it contain some “real” code.[A] :root { } /* Some comment here */
[B] :root { –color: red; } / Some comment here */PRECISION 2
Except for the option [Enable minification of CSS files] all the plugin’s options are set as the default ones, on a fresh WordPress 6.7 install, using the default theme.IMPORTANT
Remember to [Purge minify cache] each time to test the problem.
- You must be logged in to reply to this topic.