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

Asynchronous mail sending does not use store language, mails are sent in en_US instead #6511

Closed
heldchen opened this issue Sep 6, 2016 · 8 comments
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@heldchen
Copy link
Contributor

heldchen commented Sep 6, 2016

Preconditions

  1. ce 2.1.1
  2. one store view, using locale de_DE with some german translations for the order confirmation mail. (the actual language is irrelevant as long as there are translations other than en_US so that the problem is shown)

Steps to reproduce

  1. enable asynchronous mail sending
  2. create an order in the frontend
  3. wait for next cron run and check the order confirmation mail

Expected result

  1. order confirmation mail is in the language de_DE

Actual result

  1. order confirmation mail is in the language en_US

when turning off asynchronous mail sending, the mail is sent in the correct language, in our case in german. asynchronous mail sending does not seem to be setting the app store context to the correct store.

@ktruehl
Copy link

ktruehl commented Sep 7, 2016

The problem is that when executing cron or running a command from the command line, the renderer is not set correctly on the \Magento\Framework\Phrase, i.e. the method public static function setRenderer(RendererInterface $renderer) is not called with the renderer as defined by the di.xml files.

Usually this is done by Magento\Framework\App\Area in the protected function _initTranslate() method.

Find attached a patch, that gets the area from the AreaList and calls the load method with the correct part parameter.

load_translate_part_of_frontend_area_in_app_emulation-vendor_modulestore_model_app_emulation.diff.zip

@heldchen
Copy link
Contributor Author

heldchen commented Sep 7, 2016

affected are as @ktruehl mentioned all mails generated by cron / from a command line function

@sevos1984 sevos1984 added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Sep 8, 2016
@sevos1984
Copy link
Contributor

Thanks for reporting, internal ticket created MAGETWO-58198

@duhon duhon removed their assignment Sep 28, 2016
@SchumacherFM
Copy link
Member

Same here

@mrfroasty
Copy link

@ktruehl
Thanks!

@bh-ref
Copy link
Contributor

bh-ref commented Dec 28, 2016

this issue seems still present in CE 2.1.3

@bh-ref
Copy link
Contributor

bh-ref commented Feb 21, 2017

issue is still present in CE 2.1.4, but #8413 will likely fix it in a future release.

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed labels Sep 11, 2017
@magento-engcom-team magento-engcom-team added Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line labels Sep 21, 2017
@magento-engcom-team
Copy link
Contributor

@heldchen, thank you for your report.
The fix for this issue is already available in the develop branch and upcoming 2.2.0 release. See #8413.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

9 participants