Skip to content
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

Workaround for broken multi-lingual JS translation deployment in 2.1.3 and newer #72

Closed
davidalger opened this issue Jun 20, 2017 · 4 comments

Comments

@davidalger
Copy link
Owner

See magento/magento2#7862 for core-issue details. This is an implementation of a workaround to allow successful deployment of affected versions.

A loop will be employed so the static content deploy will run separately for each language specified in the :magento_deploy_languages setting.

Thanks to @dverkade for bringing this deployment issue to my attention.

davidalger added a commit that referenced this issue Jun 20, 2017
- See magento/magento2#7862 for details of core Magento issue affecting deployments.
- Issue #72
@davidalger
Copy link
Owner Author

Example Deployment

Deployment of multiple languages should look like the following with the changes in commit 0f7a9a6.

bash clicolor 1 bash 202x58 2017-06-20 10-32-05

Testing Instructions

  1. Configure deployment to use the feature branch containing the fix for this issue by using the following in your Gemfile config:

     gem 'capistrano-magento2', :github => 'davidalger/capistrano-magento2', :branch => 'feature/multi-language-workaround'
    
  2. Update your deployment dependencies

     bundle update
    
  3. Ensure you have multiple languages specified. Example:

     set :magento_deploy_languages, ['en_US', 'en_GB']
    
  4. Run a test deployment using bundler. Example:

     bundle exec cap staging deploy
    

@dverkade
Copy link

@davidalger Thanks for fixing this issue and have a workaround for the Magento issue. Can you package this into a new release? This way we can keep using our existing build script / bitbucket pipelines, so we do not have to update that in every project ;-)

Since this is a workaround for some specific Magento versions. Would it be nice to have a setting forcing this behaviour or do a check on the Magento version to determine if the static content deploy should be run per language or with all languages together?

@davidalger
Copy link
Owner Author

davidalger commented Jun 21, 2017

@dverkade Merge commit for this workaround is 33e0201. I added a version check so languages are only deployed separately for versions 2.1.3 and later. At which point this is fixed by Magento, an additional maximum version for the workaround can be added.

This has been published in release v0.6.5. Please verify the released version before I close this out. Thanks!

@avoelkl
Copy link

avoelkl commented Jul 26, 2017

Just came across this issue, updated capistrano-magento2 and wanted to thank you for this @davidalger. Works for me with version 0.6.6.

davidalger added a commit that referenced this issue Aug 18, 2017
… site deployment; see issue #72

This bug was fixed in Magento 2.1.8 per release notes: http://bit.ly/2fSF8w5
tunght13488 added a commit to tunght13488/capistrano-magento2 that referenced this issue Sep 23, 2017
* upstream/master: (34 commits)
  Updated code comment for accuracy
  Release prep
  Updated double run of static content deploy to only apply to versions prior to 2.1.8
  Reverted 4f246bd; fix noted in release notes for Magento 2.1.8 was inaccurate
  Fixed deploy routine so production mode is no longer enabled automatically when `:magento_deploy_production` is false
  Release prep
  Removed TODO file
  Update TODO
  Added tasks to set and show the current deploy mode davidalger#77
  Remove --no-ansi flags; they are not necessary since we are no longer capturing and checking output
  Strip out old multi-tenant compiler use (it was removed for core in 2.1) davidalger#77
  Updated TODO
  Updated CL and README davidalger#77
  Added comment describing why we touch the deployed_version.txt file
  Eliminated the second (secure) run of static content deploy when deploying 2.2.0-rc or later davidalger#77
  Clean up static content deployment davidalger#77
  Micro-optimized the pre-deployment version check davidalger#77
  Simply static content deploy by just dropping the use of --no-javascript altogether davidalger#77
  Cleanup warnings / special cases for Magento 2.1.0 and earlier;  davidalger#77
  Added 2.1.8 maximum version to the workaround added for multi-lingual site deployment; see issue davidalger#72
  ...
davidalger added a commit that referenced this issue May 29, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants