-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Missing CSS file #2755
Comments
Found this issue because it breaks the CSS merging in OpenMage 19.4.19 (#2753) for themes that extend on the base/default theme but do not have a styles-ie.css. |
doesn't #2754 fix this one too? |
It fixes the CSS merging. While the CSS merging is turned on everything works like it should (with only a unnecessary file lookup). But when the merging is disabled there is a missing CSS file included, resulting in a 404. Still not a very big issue but nice to fix it. |
Okay, I looked a bit further into this. It's not just the skin/frontend/base/default/css/styles-ie.css but almost all CSS files from the app/design/frontend/base/default/layout/page.xml layout file that are not in the base/default skin folder. It was just that the specific theme for this customer had all the CSS files except the styles-ie.css in their skin folder. This never got noticed before because the 404 is only visible in IE and don't broke the design of this theme untill the #2753 bug which now already is fixed. It's a bit strange that the CSS files are added in the base/default version of the page.xml file while there are no CSS files in the corresponding skin folder. We could say it's the theme developers task to make sure all CSS files added from the default page.xml file are included in there theme's skin folder or they have to override the page.xml layout file to remove them. A fix on our side could be to add only the CSS files in the page.xml file that have a CSS file in the corresponding skin folder. So we would remove them from the base/default version of the page.xml and add them to the default/default version. The downfall of this approach is that it could break other themes that where made depending on those CSS files being added by default (in the base/default fallback theme). Another fix on our side could be adding empty CSS files to the base/default theme. In this way there is always an existing backup version. I'm not sure however if loading empty files is much better then generating 404 errors. Both are not ideal. |
|
@kiatng Thank you for replying. It is still there in 19.4.* the issue is that it is not in skin/frontend/base/default/css/styles-ie.css. If you create a theme within a new package namespace (I'm not sure it is called this way but what I mean is within app/design/frontend/NEWTHEME/default and skin/frontend/NEWTHEME/default) it is not extending the default/default theme but the base/default theme. In this base/default theme the CSS files are added in the page.xml layout file but most of them are not available in the skin/frontend/base/default folder. So if a theme developer (like the commercially bought theme one of our clients is using) doesn't add the CSS files to there theme it has no fallback of those CSS files, resulting in a 404. |
In the Designer's Guide to Magento, there is some explanation on the base theme: Page 15
Page 16
So, the base package is not intended to be used as is. Then why magento-lts/app/design/frontend/base/default/layout/page.xml Lines 49 to 52 in 861b564
It's probably to maintain backward compatibility. |
@kiatng Thank you for the reference to the official documentation on this. The line:
Looks like they knew the files where missing.
The inconsistency also is that the widgets.css is included in the base/default theme.
I think we should indeed (at least for the 19.* version) keep the backward compatibility, so we don't remove the lines in the page.xml. It could break more then it would fix. If we would like to do anything, we could add the missing CSS files as backup to the base/default theme because that won't break anything and it is in line with the purpose of this base package, like mentioned in the documentation:
Or we decide that this is how Magento has chosen it should work and the developers of themes are responsible for changing the page.xml file to only include the CSS files they use in there theme. Then it's not a bug but a feature of Magento / OpenMage ;-) and a bug from the specific theme. |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
The text was updated successfully, but these errors were encountered: