- Issue created by @vensires
- @vensires opened merge request.
- Status changed to Needs review
over 1 year ago 6:34am 7 August 2023 - 🇬🇷Greece vensires
Feel free to use https://git.drupalcode.org/project/shoelace_messages/-/merge_requests/2.... for review.
When the message to be displayed is an instance of Drupal\Core\StringTranslation\PluralTranslatableMarkup, the following exception is thrown: Error: Cannot use object of type Drupal\Core\StringTranslation\PluralTranslatableMarkup as array in Drupal\Core\Render\Renderer->doRender() (line 225 of /var/www/html/public_html/core/lib/Drupal/Core/Render/Renderer.php)
.
I faced it by visiting a Input Format's page (eg. Full HTML) by having Claro 9.5.10 enabled. In that case, the message "The Classy theme has ckeditor_stylesheets configured without a corresponding ckeditor5-stylesheets configuration. See the change record for details." appeared which is an instance of the PluralTranslatableMarkup class, making that page unusable.
Instead of checking for ($message instanceof Markup)
, we should instead check for ($message instanceof MarkupInterface)
.
Needs review
1.0
Code
Feel free to use https://git.drupalcode.org/project/shoelace_messages/-/merge_requests/2.... for review.