Problem/Motivation
Error log message should be a TranslatableMarkup message too. If so, not the rendered string/message will be sent (inserted to queue), but another error will be thrown:
InvalidArgumentException: $string ("...") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup->__construct()
Steps to reproduce
Trigger an error, where the error message is TranslatableMarkup.
I checked with the feeds module, with invalid items, and got:
InvalidArgumentException: $string ("@feed: Failed importing @count @item.@feed: Failed importing @count @items.") must be a string
With purge module:
InvalidArgumentException: $string ("Exception while trying to invalidate the items: @error") must be a string.
Proposed resolution
Transfer/render TranslatableMarkup to string.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | exception_mailer-translatablemarkup-3414245-2.patch | 1.15 KB | szato |
Comments
Comment #2
szato commentedPatch added.
Comment #4
kosa ilma commented