Class attributes was gone

Created on 26 June 2025, 16 days ago

Problem/Motivation

why removed class tags with update from core ?
EG.
Bevor update To 11.2.*

<div class="messages__wrapper">
  <div class="messages messages--status" role="status" data-drupal-message-id="status-845490963532364" data-drupal-message-type="status" aria-label="Statusmeldung">Betrieb im Wartungsmodus. <a href="/admin/config/development/maintenance">Online gehen.</a>
  </div>
</div>

after update to 11.2.*
classes and data id are gone

<div data-drupal-messages="">
  <div role="contentinfo" aria-label="Statusmeldung">
              <h2 class="visually-hidden">Statusmeldung</h2>
              Betrieb im Wartungsmodus. <a href="/admin/config/development/maintenance">Online gehen.</a>
          </div>
</div>

used files
core/modules/system/templates/status-messages.html.twig

ist very nerving if you have made the styles an then yoyu remove or changes wit out messages the attributest

🐛 Bug report
Status

Active

Version

11.2 🔥

Component

system.module

Created by

🇩🇪Germany kisugiai

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

Comments & Activities

  • Issue created by @kisugiai
  • I think this could be a duplicate of 🐛 AJAX MessageCommand markup and styling differs from Theme default Active or one if its related issues. Can you verify?

  • 🇩🇪Germany kisugiai

    hm, if i see its has was todo with the js or not and Drupal 10.x not sure

    if i install Drupal 11.1.8 the Class attributes are rendered but if i install 11.2.x then the class attributes are gone
    i have atm my own status-messages.html.twig runing (changed from oliverio) so i get the type of messages back to the class array.

    but if i use the twig from system/templates the classes and are gone. the classes would not print in the class tag.

  • 🇳🇿New Zealand quietone

    If this problem was discovered on a version of Drupal that is not 11.x, add that information in the issue summary and leave the version at 11.x. In Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies . Also mentioned on the version section of the list of issue fields documentation.

Production build 0.71.5 2024