Broken ajax replacement for views with attachments

Created on 7 February 2017, about 8 years ago
Updated 23 February 2025, about 1 month ago

My view has an attachment. The main part of the view (not the attachment) has a pager. The pager triggers VIF, which replaces the entire view with the new entire view, including attachment nodes.

Problem:

All the find('.view-content') find ALL the .view-content nodes, including those within attachments. It should find only the main view's content.

Solution:

Use children('.view-content') instead of find('.view-content').

This takes only the view's main content from the ajax response, and adds it to only the current view's main content.

Patch to follow.

🐛 Bug report
Status

Closed: outdated

Version

2.1

Component

Code

Created by

🇳🇱Netherlands rudiedirkx

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024