- ๐บ๐ธUnited States glynster
Best solution is to add to your theme preprocess andikanio ๐ 10.3 upgrade now missing status-message theme suggestions Postponed
- ๐ง๐ชBelgium gorkagr
@ady1503, as far as i tested, those themes are not affected by this issue, at least not to me. Olivero implements its own drupal.messages override (if i am not wrong)
Bootstrap, radix.. those yes (at least to me)
- ๐ช๐ธSpain ady1503
I make refactoring of mi code to
\Drupal::messenger()->addStatus(t('Dear %user, Welcome to our %site',['%user' => 'admin', '%site' => 'Drupal Learn'])); // Prepare the goto Url. $url = Url::fromRoute('<front>'); $response = new RedirectResponse($url->toString()); $request = \Drupal::request(); // Save the session so things like messages get saved. $request->getSession()->save(); $response->prepare($request); // Make sure to trigger kernel events. \Drupal::service('kernel')->terminate($request, $response); $response->send();
and mi notifications works without patch 45, with theme gin and olivero.
source: https://blog.birk-jensen.dk/drupal-http-redirection-from-anywhere
https://www.drupal.org/node/2023537 โ @catch I implement
Drupal.theme.message
, and that doesn't fix the issue, because the function isn't being called for the BigPipe messages. Only commenting out that BigPipe code fixes it.- ๐ฌ๐งUnited Kingdom catch
The proper fix for sites experiencing this is:
1. If you have a custom theme, then implement
Drupal.theme.message
in your theme, there are examples of how to do this in both Claro and Olivero themes in core. Umami does not do this but ๐ Add js message theme override to match Umami message markup Needs work is the issue to add that, and will show the kind of changes necessary.2. If you're using a contributed theme, open an issue against that theme's issue queue to add JavaScript messages support.
I've updated the issue summary with instructions. If we do ๐ AJAX MessageCommand markup and styling differs from Theme default Active , that will mitigate this for themes that don't style JavaScript messages (because the messages would be rendered in PHP), but there could still be edge cases where sites see unthemed messages.