- Issue created by @pbabin
- 🇺🇸United States fizcs3 Omaha, Nebraska; USA
I'm seeing the same duplication of status messages; on mercury_editor 2.2.4.
In our case, we are using the contribcontent_lockmodule, and it's message appears:
What I'm finding is that the
{{ form['status_messages'] }}(mentioned above, and below) is displaying the second smaller status message.
templates/mercury-editor-entity-form.html.twig{{ attach_library('mercury_editor/node_form') }} {{ form['status_messages'] }} <header class="me-node-form__header"> <h1 class="me-node-form__title">{{ form['#title'] }}</h1> </header> {{ form|without('status_messages', 'advanced', 'footer', 'actions', 'gin_actions', 'gin_sidebar', 'gin_sidebar_toggle') }}It's the page template that displays the larger "system" status message at the top via
{{ page.highlighted }}:
templates/page--mercury-editor.html.twig<mercury-dialog id="me-edit-screen" hide-close-button push resizable dock="right"> {{ page.highlighted }} {{ page.content|without(local_actions_block) }} </mercury-dialog>So, it depends which status message style is wanted here? I presume the second one is what we want, less space used.
If so, then the task instead would be to remove the status message that displays in the highlighted region... - Merge request !122Issue #3498042: Core Messages duplicated in Mercury Editor form → (Open) created by Unnamed author
- 🇮🇳India anirudhsingh19
As mentioned by @fizcs3, The duplicate messages were caused by 2 templates.
templates/page--mercury-editor.html.twig
<mercury-dialog id="me-edit-screen" hide-close-button push resizable dock="right"> {{ page.highlighted }} <strong>Responsible code</strong> {{ page.content|without(local_actions_block) }} </mercury-dialog>templates/mercury-editor-entity-form.html.twig
{{ attach_library('mercury_editor/node_form') }} {{ form['status_messages'] }} <strong>Responsible code</strong> <header class="me-node-form__header"> <h1 class="me-node-form__title">{{ form['#title'] }}</h1> </header> {{ form|without('status_messages', 'advanced', 'footer', 'actions', 'gin_actions', 'gin_sidebar', 'gin_sidebar_toggle') }}I think the later was better to be removed as the first one was styled better, according to the default administration theme.