Close

CSS bundling and minification not working with plugins

JRon
7 years ago
#14091 Quote
Avatar
  • 67
Hi there, I am upgrading my theme, which is based on Nop Alfresco, from 3.7 to 3.9

On my test page, if I enable "CSS bundling and minification" everything works well except for the two plugins I am using (JCarousel and Ajax Filters) no css is loaded for those, it´s like Nopcommerce doesn´t add the css to the bundle and just skips it.

Any idea why this could be happening? if I uncheck the "CSS bundling and minification" all css is loaded.
SDobrev
7 years ago
#14092 Quote
Avatar
  • 283
Hi,

If it is possible, please submit a ticket and provide URL and admin credentials to your store so we can further investigate this problem.

What is the exact version of the products you are using?
We will try to reproduce the problem locally.

Thank you!
Best Regards,
Stoyan Dobrev
Nop-Templates.com
JRon
7 years ago
#14098 Quote
Avatar
  • 67
Thanks for the reply, I have "fixed" the problem for now by changing the AddCssFilePart code from:
Html.AddCssFileParts("~/Plugins/SevenSpikes.Nop.Plugins.PluginName/Themes/" + Model.Theme + "/Content/PluginStyles.css");

to:

<link rel="stylesheet" href="~/Plugins/SevenSpikes.Nop.Plugins.PluginName/Themes/MyTheme/Content/PluginStyles.css" />

I need to do some digging in my code to find out what went wrong, I am running two NOP 3.7 websites,both running a modified version af the Alfresco theme, One works fine but the other one has this problem of not adding the plugin css files when bundling, do you have any idea why it would be working on one but not the other, is there a script I should look into to find out where the difference is?
SDobrev
7 years ago
#14099 Quote
Avatar
  • 283
Hi,

Most probably there is a syntax error in any of the CSS files and this is breaking the minification/bundling.
Best Regards,
Stoyan Dobrev
Nop-Templates.com
JRon
7 years ago
#14100 Quote
Avatar
  • 67
Thank you so much for your help, the problem has been solved, the problem was with a missing } - I thought I had reviewed all my css files but found the error after double checking now.