-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Major 2.1.3 regression bug breaks js translations, caused by overly aggressive performance optimizations of the static content deployment #7862
Comments
@hostep I think their testing procedures are broken. Just going by TravisCI, even pull requests always fail with the same error. I'm of the opinion that this error is hiding a lot of other major errors. @woosley-mg @benmarks can version 2.1.4 be completely clean please? |
2.1.3. Also happens in backend. Confirmed. I noticed this also. I had to disable static versioning in Admin Configuration Development, else "translations-nb.js" was not loading. I got the error when I tried to list products in admin - empty result and stops at loading spinner because the translation JS file was not found. |
Another issue with this optimization is that when you did all steps as it described in install guide, the js and css don't work. Magento 2.1.3 looking for it in some strange location for example http://magento2ce.loc/pub/static/version1482322390/adminhtml/Magento/backend/en_US/requirejs/require.js. Why it 'version1482322390' path is appeared in my url? I do not have it directory, so, js and css could not work. |
@molneek: this again has nothing to do with what I describe above. What you now experience is that Magento has switched the static signing of assets to on by default now.
You can disable this in the backend under |
@hostep Thanks, but who can explain why it versioning was necessary enabled by default?
is located in middle of release notes. After install new version I expect that all previous features work as well as before but every time I get new issues and should looking for solutions for fix this instead of do my work. |
@Ctucker9233 See tweet stream here: https://twitter.com/tonypiper/status/809328942968664064 – also, the semantic version was increased to say BC, but the notes said no BC. They have confirmed the bug (affecting Travis) is in test and not in M2 code, but you're right, it could be hiding all sorts of other nasties. |
Hi @hostep Thanks for reporting. |
I have same problem with 2.1.3 js-translations. |
I am experiencing the same issues also on 2.0.11 when using: setup:static-content:deploy en_US fr_FR |
It's work if you do setup:static-content:deploy en_US |
@phillipvandebriel ah i noticed this works. Well i am deploying using capistrano for multiple installations. So i have to write a new task for that, thank you! |
The suggested workaround works indeed. However, I noticed the js-translation file also remain empty when requesting one language in combination with a specific theme or area. In other words, js-translation files also contain an empty string when using one the following commands (and probably commands with other extra parameters):
|
Same problem. |
@ALL btw. if you only have 1 language for a site it also helps setting all admin users locale to the locale of the frontend store. That way you don't have to compile the en_US language ,it saves the hassle. Afterwards you deploy with static-content:deploy (language code) |
@redelschaap are you sure? Because we run something like this when we deploy and it works perfectly fine:
(the |
@hostep My steps:
Result: all js phrases on English (minicheckout, checkout). |
@Flamestyle: sorry, you must be doing something wrong, because it works over here.
$ head -c 100 pub/static/frontend/Magento/luma/ru_RU/js-translation.json
{"Close":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c","Loading...":"\u0417\u0430\u0433\u0440\u0443\u after cleaning up the escaped characters (just informational, the above should already work):
|
@hostep I don't using composer with Russian pack. Only add file ru_RU to theme. Or make my pack same official documentation. |
@hostep Yes I'm sure. Just tested this again. It only works for me when I delete the |
@hostep Please detail your steps.
Method 2: Add
Same problem: js phrases are not translated. |
@magento-engcom-team - Any update on this please? |
@BenSpace48 I've checked the internal ticket and have seen some progress on this issue. I've chased again to get a better understanding on where this sits. |
Thanks as always! <3 |
Hi @TomashKhamlai. Thank you for working on this issue.
|
Hi @engcom-backlog-tomash. Thank you for working on this issue.
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
Still a problem in 2.3 installed from composer create project can someone please give an example of what the contents of the js-translation.json file looks like as mine is just |
@LiamKarlMitchell: I'm pretty sure you are running against another bug. This bug here is around the Even though I'm like 99% sure this was fixed in Magento 2.2.2 and higher the labels added by @engcom-backlog-nazar seem to contradict this. Haven't tested it on 2.3 though... |
I think I know this error and I solved it by the following patch :
|
Thx man! You save my day :) |
Closing as this was fixed somewhere in Magento 2.2.x The only reason this ticket was still open is because it wasn't fixed yet in Magento 2.1 |
…3 and through 2.2.2 or possible up to but not including 2.3.0 Indicator of being fixed in 2.2.2 and later: magento/magento2#10673 (comment) Indicator of it being fixed in 2.3.0 and later: magento/magento2#10913 Related to magento/magento2#7862 which is now closed as resolved in 2.2.x somewhere
Preconditions
Steps to reproduce
--skip-compilation
flag)setup:static-content:deploy --theme=Magento/luma en_US nl_NL fr_FR
Expected result
Actual result
setup:static-content:deploy
command)Discussion
Magento 2.1.3 has optimized the static content deployment so it only generates the content for the first language and then blindly copies that directory to the other requested locales.
This is really great, because 99% of the files in those directories are always the same.
Except for the javascript translations...
And now we have this problem caused by this optimization.
More info
In Magento 2.1.2, if I take a diff of the nl_NL & fr_FR directories, I see 4 files which differ:
I'm not sure if the changes in the email css files are important, the changes in the styles-m.css files only differ by the order in which they are defined (which is weird, but whatever), but the most important file is that
js-translation.json
file.Workaround
You can work around this bug by executing the
setup:static-content:deploy
command for every language separately:But this means you can't depend on the performance optimization which runs these processes in parallel, which was introduced in 2.1.1.
@ Magento team: seriously, can you actually test stuff before releasing them into a new version? We aren't waiting on new "performance optimization" features, we just want bug fixes for now, not new features with new bugs.
@woosley-mg @benmarks: I expect this major bug the be resolved in maximum 2 weeks (or let's make it 3 due to the upcoming holidays). Thank you!
The text was updated successfully, but these errors were encountered: