System Status Messages lose theming in core 10.3 with BigPipe enabled

Created on 1 July 2024, 11 months ago

I'm not sure if there's anything you can do about it, but after updating to Drupal 10.3.0, system messages revert back to default markup if BigPipe is enabled. status-messages--alerts.html.twig is no longer applied.

There are two core issues filed that could be related. https://www.drupal.org/project/drupal/issues/3456525 πŸ› status message notification twig file name changed Postponed: needs info is marked "duplicate" of https://www.drupal.org/project/drupal/issues/3456176 πŸ› 10.3 upgrade now missing status-message theme sugestions Active , but suggests a potential solution (I did not verify if it actually works).

Mostly I'm submitting this in case others run into the same thing we did. We ended up just disabling BigPipe until things get sorted out.

πŸ› Bug report
Status

Active

Version

5.5

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States timhsieh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @timhsieh
  • πŸ‡«πŸ‡·France sΓ©bastien-fr Nantes - France

    Thank you for this topic because I encounter the same problem and I didn't understand because everything worked before.

    Messages displayed with toast work in certain cases (for example when a user logs out) but it no longer works in a custom form if I do that for example.

    \Drupal::messenger()->addStatus('Votre demande n\'a pas Γ©tΓ© enregistrΓ©e : ' . $test->reason);

    If I disable BigPipe everything works.

  • Status changed to Closed: duplicate 11 months ago
  • πŸ‡΅πŸ‡ͺPeru hatuhay Lima

    This issue belongs and is reported on core

  • πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA

    For me, the issue only occurs with some authenticated users. I've tried to narrow it down a bit based on permissions, but no luck.

    Disabling BigPipe solves the issue for all users, so I'll be waiting for πŸ› 10.3 upgrade now missing status-message theme sugestions Active to be resolved as well.

    -mike

  • Status changed to Needs work 10 months ago
  • πŸ‡¨πŸ‡¦Canada nubeli

    According to https://www.drupal.org/project/drupal/issues/3456176 πŸ› 10.3 upgrade now missing status-message theme sugestions Active this may be something that this theme needs to implement. So reopening the issue.

    MessageCommand and the associated JavaScript API was added to Drupal core in 2019/Drupal 8.8.0, but was not used widely in Drupal core until 10.3.0, when the bigpipe module began using it to render messages created within bigpipe placeholders.

    Because MessageCommand has not been used widely, many custom themes have not themed custom JavaScript messages.

    For examples of how to override message theming, see:

    core/themes/olivero/js/message.theme.js

    and

    core/themes/claro/js/messages.js

    And the associated libraries-extend entries in those themes' .info.yml files.

  • Status changed to Closed: outdated 10 months ago
  • πŸ‡΅πŸ‡ͺPeru hatuhay Lima

    Fixed on beta version

  • πŸ‡ΊπŸ‡ΈUnited States khaldoon_masud

    Proposed solution at https://www.drupal.org/project/drupal/issues/3456176#comment-15738200 πŸ› 10.3 upgrade now missing status-message theme sugestions Active fixed it for me.

  • πŸ‡§πŸ‡ͺBelgium Fred R

    Proposed solution #7 fixed it for me too.

  • πŸ‡΅πŸ‡­Philippines bryanmanalo

    Not sure if I should create a new issue or just add it here since I am using 5.x version and not 5.5.x.

    Adding a patch for 5.x branch.

    The required markup for message.js is different for 5.5.x and 5.x.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    In Drupal core, child issues are typically required to be fixed before the parent issue is closed. So, there shouldn't be child issues outside of the drupal core project. To help with the management of core issues, I am removing the parent as it is already listed as a related issue.

Production build 0.71.5 2024