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.
Comments
Comment #2
rudiedirkx commentedPatch. Created from 2.0, but should apply to current 2.x (23f4efb).
Comment #3
Anonymous (not verified) commentedBumped into the same attachment issue:
Patched #2 to current 7.x-2.1
Works perfect thanks!
Comment #4
wouter waeytens commentedI have the same problem on the D8 version. Is there any patch available for this issue?
Comment #5
bernman commentedThis patch solved the problem stated for me perfectly. I'm marking this as RTBC against 7.x-2.1.
Comment #6
zenimagine commentedSame problem for Drupal 8.5
Comment #7
zenimagine commented#2 Could not apply patch
Comment #8
yazzbe commentedApplied patch #2 manually against 7.x-2.1 and worked perfectly.
Comment #9
izmeez commentedI am changing this to needs work because it is related to #2736419: Views infinite scroll doesn't work with nested views and obliterates changes from that issue that were committed to 2.x-dev
Comment #10
izmeez commentedI am changing the status back to RTBC as it was because there is reference to this also being a 8.x issue, even though it will need to be re-rolled against the latest 2.x-dev and take into account the findings in #2736419: Views infinite scroll doesn't work with nested views
Comment #11
izmeez commentedSorry for flip flop but this patch will still need work to apply against 2.x-dev
Comment #12
anybodyDrupal 7 is EOL.