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.

Comments

szato created an issue. See original summary.

szato’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB

Patch added.

  • Kosa Ilma committed 6452e9e7 on 4.0.x authored by szato
    Issue #3414245 by szato: TranslatableMarkup trigger...
kosa ilma’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.