New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static files fall back mechanism docs clarification #2609
Comments
What's the status on this item? Currently studying for front-end developer exam and was curious about the fallback with locales and like you, my tests showed option 1 for files with module context does NOT work. All the other options work alright. Thanks for clarifyig the docs, or should M2 code be corrected? |
@bdenham Any news? 📰 |
@magento I am working on this |
@Santoshziffity Are you still working on this? |
This issue was dealt with and fixed in Feb 2021 by @Santoshziffity so is being closed |
10 22 integration
Topic clarification/correction request
Theme inheritance
Topic Link
https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/theme-inherit.html
Description
There is issue with docs about overriding static files.
Section "If module context is not defined for a file" seems correct but if "module context is defined for a file" seem it doesn't work (path nr 1) for case like:
If module context is not defined for a file (second and third image above) it properly looks for file in those paths:
<theme_dir>/web/i18n/
<theme_dir>/web/
However if we use "Magento_Catalog::" then it doesn't check/get a file from nr 1 option but only from nr 2
It's not big deal as usually people won't put there a files (at least images - didn't check for other types) but it should be fixed/clarified how it works in documention as now it seems to be wrong for this case.
If module context is not defined for a file:
Current theme static files for a specific locale (the locale set for the storefront): <theme_dir>/web/i18n/
Current theme static files: <theme_dir>/web/
Ancestor’s static files, recursively, until a theme with no parent is reached:
<parent_theme_dir>/web/i18n/
<parent_theme_dir>/web/
Library static view files: lib/web/
If module context is defined for a file:
Current theme and current locale module static files:<theme_dir>/web/i18n//
Current theme module static files <theme_dir>//web/. Example: app/design/frontend/OrangeCorp/orange/Magento_Catalog/web/
Ancestor themes module static files, recursively, until a theme with no ancestor is reached:
<parent_theme_dir>/web/i18n//
<parent_theme_dir>//web/
Module static view files for the frontend area: <module_dir>/view/frontend/web/
Module static view files for the base area: <module_dir>/view/base/web/
Possible solutions
Remove option 1 for module context is known or update/clarify it.
Additional information
The text was updated successfully, but these errors were encountered: