Views attachment ajax not working

Created on 9 November 2024, 5 days ago

Problem/Motivation

I have an attachment in the form of an A~Z contextual filter that filters the view it is attached to by one of the fields.

It worked in some earlier iterations of my theme but when I updated my theme and used the contrib Stable theme as my Base Theme, it no longer worked.

Although I use attachments like this in many sites, mine is a fairly specific use case because I mainly work with organizations that have membership rosters but I expect there are other use cases where an attachment is used for a filter that uses an AJAX response and it will fail.

Steps to reproduce

Using Stable as the Base Theme for a custom theme, create a view with an attachment contextual filter that uses an AJAX response to render the filtered results.

Proposed resolution

I found that the problem is that the views-view-summary-unformatted.html.twig template requires the following classes:
- views-summary
- views-summary-unformatted

To fix this issue, the views-view-summary-unformatted.html.twig template needed an edit within the {% for row in rows %} loop. I have attached a patch.

Remaining tasks

Patch attached.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇨🇦Canada awasson

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

Comments & Activities

Production build 0.71.5 2024