- Issue created by @Aaron Gil Martinez
- Status changed to Needs review
about 1 month ago 6:46pm 13 May 2024 - last update
about 1 month ago 38 pass - last update
about 1 month ago 38 pass
The Digest formatter service uses message view builder to get processed messages with elements like tokens or arguments, but since its using the same entity to get the render array for different users those are cached, and the later message for a list of users will get the first version.
1. Create a template with a token using the author.
2. Send message digest to diferent users with messages from the template.
3 First message digest will display a message with the right token value, but the second won't.
Ideally the solution would be to handle the cache, but for this case the service uses the renderPlain method to avoid cacheability so in my opinion its better to clone the entity like in message_subscribe.
1. Added test to reproduce the issue
2. Added possible fix
3. Removed t() function from form interval test
Needs review
1.0
Code