- Status changed to Needs work
12 months ago 6:54pm 1 December 2023 - 🇬🇧United Kingdom adamps
Thanks for the report, well spotted. Your fix is correct, however I have suggestion that I feel is a little simpler.
This module automatically switches the language in
Mailer::doSend()
, which is intended to mean that email builders don't have to worry much about language. The switch happens between build() and preRender().Unfortunately,
SimplenewsNewsletterEmailBuilder
callssetBodyEntity()
inbuild()
, which is before the language switch. I think if this line is moved topreRender()
(create a new function) then it would then work automatically. Please could you give it a try? - 🇩🇪Germany tomsaw Essen
Got it AdamPS. Sounds much better and I check your proposed solution soon.
- 🇬🇧United Kingdom adamps
Great. Please can you add a comment to explain, something like this "Set the body entity in the pre-render phase to get the right language".
This module has now moved to gitlab testing which works on merge requests instead of patches (which are now deprecated for all Drupal.org). Please can you make a MR?
- 🇩🇪Germany tomsaw Essen
The translation concept is worth being explained in the Interface above
preRender
declaration I would say! - Status changed to RTBC
11 months ago 10:10am 14 December 2023 - Status changed to Fixed
11 months ago 12:53pm 14 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Needs work
11 months ago 4:51pm 12 January 2024 - 🇬🇧United Kingdom adamps
Unfortunately this doesn't work, sorry for the bad advice. The email policy is ignored, we only see the node entity.
The call to $email->setBodyEntity() in preRender() it comes after BodyEmailAdjuster->build() and overwrites it.
- 🇬🇧United Kingdom adamps
I believe we can't fix it yet. However it will be automatically fixed by 📌 Change to the phases Active in v2.x.
- 🇬🇧United Kingdom adamps
This was fixed by 📌 Change to the phases Active
Automatically closed - issue fixed for 2 weeks with no activity.