Small update to avoid spurious warning on custom field 'date_unpub'.
- Status changed to Needs work
almost 2 years ago 8:19pm 8 February 2023 - 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Hi @BramDriesen,
I did not manage to make the patch #3 work. Si I made my own, but it is a kind of mismatch between general use and specific.
Previously the notification was created with some token and replaced before being stored into the database in the current context within the current language. So, the complete notification was published and readable in only one language (because with replaced tokens the rendered sentence is no more generic and not translatable).
What I have done is keep these token unreplaced, so that the sentence stored into the database is a generic one and can be translated.
And then during the final rendering of the notification I replace token with the correct words translated and the translated generic sentence.To do so I have created some attributes to be store in the database to feed token (user id, node id, publication date etc...) to get node title translated for ex.
So these attributes are custom and depending on what we want to see in notification messages. The patch may not directly work on your environnement, but the mechanism to store le notification untokenized can be reused.
Ideally a generic feature shall be implemented to store automatically required attributes for token used to create the notification.