Closed
Description
PSR-4 dictates that underscores have no special meaning and can be used in module names. There have been multiple PRs accepted for this bug in other areas of Magento but this one has been missed.
This is in \Magento\Framework\App\Utility\Files::accumulateThemeStaticFiles. This method collates static files from your theme. The bug means that it's not possible to extend a static file from a module that has an underscore in the module name (eg. FishPig_WordPress_IntegratedSearch).
Preconditions (*)
- Magento 2.4.2 - but this is probably present in all versions from 2.0.0
Steps to reproduce (*)
- Install Magento 2.4.2
- Extend a CSS file from a module with an underscore in the module name (app/design/frontend/YourVendor/YourTheme/ThirdParty_Module_Test/web/css/source/_module.less)
- Compile the static assets
Expected result (*)
The _module.less is processed correctly
Actual result (*)
Error happened during deploy process: Could not parse theme static file '/var/www/test-siteapp/design/frontend/YourVendor/YourTheme/ThirdParty_Module_Test/web/css/source/_module.less'
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done