- Issue created by @SirClickALot
- πΊπΈUnited States kwiseman
I just tried setting up a Views Bootstrap accordion with a Drupal 10.4 site and have also noticed that the accordion buttons don't open their content. However, I have aggregation turned off. In my view, I've set accordion grouping to "Accordion content by grouped field" (in other words, group the output).
For accordions with grouped output only, I noticed that invalid HTML ids were being generated for the accordion's header and the
<div>
holding the accordion's body (lines 30 and 35 of views-bootstrap-accordion.html.twig). The invalid part of their IDs comes from a xss-filtered version of the accordion button's text set as an array key in the preprocess function for the accordion template (line 55 of views_bootstrap.theme.inc, I think). When I cleaned the filtered button text to make sure it works as an HTML id, the accordions began to work for me.@sirclickalot, are your accordions grouped too? Maintainers, does what I'm experiencing sound like a separate issue? If so, I'll be happy to make that issue, elaborate, and/or provide the MR.