Disable javascript minifying of TinyMCE 7 library, to fix a bug with…#39253
Disable javascript minifying of TinyMCE 7 library, to fix a bug with…#39253hostep wants to merge 1 commit intomagento:2.4-developfrom
Conversation
… loading language files from it.
|
Hi @hostep. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
|
@magento run all tests (is probably not needed for this PR, but lets just run them once) |
|
Failed to run the builds. Please try to re-run them later. |
|
@magento run all tests |
|
@magento create issue |
|
Hi @hostep, Thanks for your Contribution!!. As per this comment #39263 (comment) moving this PR to Thanks. |
|
Closing, was apparantly fixed internally by:
|
… loading language files from it.
Description (*)
I've seen it happening on Magento 2.4.7-p3 where TinyMCE v5 was updated to v7, but it also happens on
2.4-developbranch.It's a minor bug, nothing really important I think, just making sure people can read the help section of the TinyMCE editor while using it.
So, when Magento has JS minification enabled, during SCD* it will transform any .js file it finds that doesn't already end its filename with
.min.jsto a minified version of that and rename the file fromxxx.jstoxxx.min.js.However, in case of the TinyMCE 7 library, when it tries to load its language files from here, it doesn't expect them to have the filename of
{language-code}.min.jsand fails to load them.In this PR, we prevent this from happening and disallow minification of js files whenever the pattern
/tiny_mce_7/is found in a path when the SCD* process processes js files.*SCD = static content deploy
Related Pull Requests
Fixed Issues (if relevant)
None at the moment
Manual testing scenarios (*)
bin/magento config:set dev/js/minify_files 1bin/magento setup:upgradebin/magento deploy:mode:set productionCurrently at step 8 you see these error messages:
And at step 9 the help doesn't open and you get another error message:
With the fix from this PR, that's all solved.
Questions or comments
Adding automated tests for this will be hard, so I'm not doing it, hopefully that's okay, if not, please write them yourselves, I won't have the time to put into this task.
Contribution checklist (*)
Resolved issues: