Asset Optimization disable loading of all CSS
-
Hi
After activating the Assent Optimization, whenever I try to compress or move to footer any asset all css files stop loading. The only solution to return the website to normal is to reset the Asset Optimization to default from settings.I have even tried with unimportant files such as akismet-form (form.js) which is not loaded on home page but got the same issue.
So, what’s causing that?
-
This topic was modified 7 years, 8 months ago by
Fadi Hania.
The page I need help with: [log in to see the link]
-
This topic was modified 7 years, 8 months ago by
-
Hello there @fadi_hania
Hope you’re doing good and thanks for reaching us! 🙂
I’m quoting from our documentation page here:
https://premium.wpmudev.org/docs/wpmu-dev-plugins/hummingbird/#chapter-4
as the Advanced Mode of Asset Optimization can easily give you broken results.The most important thing when working with Advanced mode and making changes to how your site loads files is that you test things out after every single change.
It is not recommended to select all your files, click on Bulk Update, and enable all of the options at once. This could have disastrous consequences for your site, and break a lot of things! Please do not do this!
You won’t be able to apply every option to every file, so it is very important to test as you go. (and make sure to click on Save Changes beforehand!)
If a change you make does not work or affects the Front End of your site, then just go back to the Minification section and undo the last change you made. After you save your changes again and clear your cache, everything will be right back as it was before.
This process can take some time to get right, but once you do it will be worth it!
So, solution here is to move with one file at a time, do compress/combine/move to footer/defer the file in separate steps, and every time check your frontend pages. If you get broken results, revert last change (so you have a looking good result) and carry on with next file.
Warm regards,
DimitrisHi Dimitris,
I have read that in plugin documentation and that what I was trying to do, work on one file at a time. But it seems you misunderstood my issue:
– This happens in both basic, advanced mode and with all files, all css file stops loading (with no exception).
– Reverting last change done does not fix the issue, it persists and the css files does not load. The only way I found to fix the issue is going to Assets Optimization settings and reset to default.Let me know if more details are required…
Regards,
FadiHello @fadi_hania
Hope all is well!
I’ve tested the plugin on my end and could not replicate the issue. When Hummingbird minifies a CSS or JS file it is changing the file path and placing the file in
wp-content/uploads/hummingbird-assets/directory. Where such folder pathdomainname.com/wp-content/uploads/hummingbird-assets/random-file-name.cssshowed up after enabling Asset Optimization on your site?Please see if this folder is created and that it has the right permission if it is set to 744, if not, please set them to 744.
Also, please see if there is a pending state showing like in this screenshot.
Also, form.js file from Akismet is not loading in the front end of your site even when the plugin is deactivated.
Please advise
Kind regards,
NastiaHi Nastia,
Thanks you for your reply…After trying again with form.js here’s my answers to your questions:
Where such folder path domainname.com/wp-content/uploads/hummingbird-assets/random-file-name.css showed up after enabling Asset Optimization on your site?
The form.js shows up in that folder minified with the name 1ef2abd01a6b3d4acccd589ab9606831.js but not loaded on the post page that uses it. It is still loading the original form.js.
Please see if this folder is created and that it has the right permission if it is set to 744, if not, please set them to 744.
Yes, the folder is created and it has 744 permission.
Also, please see if there is a pending state showing like in this screenshot.
When first publishing the minification change it is there until I visit the post page that uses the file then it disappears and shows the change in size.
Also, form.js file from Akismet is not loading in the front end of your site even when the plugin is deactivated.
Yes, it is not loaded on home page when plugin deactivated. It is only loaded in posts page.
Check this link for a screenshot.
So, what’s the relation between minifying a JS file and not loading all CSS files with no exception. Furthermore, Still the only way to undo this issue of not loading CSS files is to reset Asset Optimization setting to default
Hope that helps, let me know if more details are required.
Regards,
Fadi-
This reply was modified 7 years, 8 months ago by
Fadi Hania.
Hello @fadi_hania
I apologize for a late reply!
I’ve tested again Akismet plugin and can’t reproduce the issue. Please let me know are you using any other optimization plugins?
Would you please run the following test? Please deactivate all the other plugins except Hummingbird and Akismet, minify the fomt.js file from Aksiment, and reload a few times a blog post. Make sure that form.js was minified ( it will show the compressed file size below the file name) and see if the CSS files will load or not in an incognito browser. If these will not load, will they show 404 error in the developer console? If yes, what is the whole path to the CSS file?
If the CSS file will load, please start activating one file at a time. Recheck the Asset Optimization files and see if the CSS will stop loading.
Let us know how it went!
Cheers,
Nastia -
This reply was modified 7 years, 8 months ago by
The topic ‘Asset Optimization disable loading of all CSS’ is closed to new replies.