When a new comment is added, this appears as text after the messsages:
<div style="">
<div role="contentinfo" aria-label="Statusbericht" class="js-ajax-comments-messages messages drupal-messages messages--status">
<h2 class="visually-hidden">Statusbericht</h2>
<ul class="messages__list">
<li class="messages__item">Uw reactie is geplaatst.</li>
</ul>
</div>
class="js-ajax-comments-messages"
</div>
Sorry for not providing a real fix, the patch fixes this for me, currently can't dig deeper.
I copied the comments template from the classy theme to my theme, so this probably isn't be the problem.
Comments
Comment #2
workplaysleep commentedComment #3
doxigo commentedHave the same issue on "Radix" theme
Comment #4
darvanenYeah, entity action links are weird, they don't seem to go through the usual render engine, just get tacked on at the end. Changing instances of
'attributes'in this module to'#attributes'which would normally work for the renderer actually breaks all of the AJAX behaviour on sites that were previously working because the classes and data attributes are no longer attached.I don't know why that's happening, or how to fix it.
Comment #5
qzmenkoIt's seems like problem in yours themes.
Class "js-ajax-comments-messages" added in preprocess for status messages.
Using default template status-messages.html.twig all works fine.
As I see in Radix theme https://cgit.drupalcode.org/radix/tree/templates/system/status-messages.... all attributes (except for some) are for some reason displayed at the end of the template.
I think you need create issue in Radix theme.
Comment #6
qzmenkoCreated issue in Radix theme:
#2963036: Remove printing attributes from status-messages template