Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
Olivero theme
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Feb 2024 at 08:24 UTC
Updated:
18 Mar 2024 at 10:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
govind_giri_goswami commentedchanges in closeMessage() function, which adds a close button to a message container if one doesn't already exist, and hides the message when the close button is clicked
Comment #5
smustgrave commentedWould be good to add solution to the issue summary.
Comment #6
pravesh_poonia commentedApplied MR 6753, Mentioned issue fixed
Comment #7
tanuj. commentedComment #8
shreyal999 commentedThe code should have indentation or line gap as in the previous version for code clarity.
Comment #10
kostyashupenkoWondering what is the cause of that fact that
once()in that case doesn't actually work (works 2 times)Comment #11
dineshkumarbollu commentedConfirm MR fixes the issue.
Comment #12
adwivedi008 commentedI tested the MR mentioned in #4, and it fixes the issue
So moving the issue to RTBC
Comment #16
nod_when bigpipe is enabled, the status message comes from a bigpipe/ajax command.
The message commands adds a new message using Drupal.theme('message') it calls olivero implementation of the theme function that adds a close button. Nothing is using once at this point. Then when the page loads, behaviors are called, and a second close button is added to the message. Once is working as expected it's just not at the right place.
Theme functions should be returning plain strings instead of objects, that would have prevent the double initialization.
Fix makes sense in this situation.
Comment #21
nod_Committed 068b95a and pushed to 11.x. Thanks!