I have a "Global: Text area" in the header of the view. This content is also duplicated when the autoloader kicks in and prints the "Global: Text area" above each page so there are multiple Headers.

If needed I am happy to show you a live version (via PM) or provide a list of modules etc.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cirrus3d’s picture

Having issues with this also.
When there are field defined in the view header, the jquery autoload seems to run for all of them :)

EDIT -> From what I'm seeing, the module targets the "div.content" element of the view. This causes the module to actually target
multiple elements due to the header (and probably footer) views attachments having the same classes defined.

Since I have come across the same div.content class problem before without using the views_infinite_scroll module (many content class divs in the same view will make it difficult to target only one of them), maybe we should submit an issue in the views module - but that's only my two cents.

Dom.’s picture

Version: 7.x-1.1 » 7.x-2.x-dev
FileSize
704 bytes

Hi!
I solved this issue with the following patch.

Sam152’s picture

Perhaps we should backport the approach taken in #2680265: On click load more are old elements replaced with new ones instead of append. Can anyone confirm?

Sam152’s picture

Status: Needs review » Needs work

I think the fix in the linked patch will be more robust.

Dom.’s picture

Status: Needs work » Needs review
FileSize
781 bytes

Just a little change for the ajax answer is sometimes inside a div wrapper. I experiment this depending on the environnement I'm running the module, but I don't know the reason for this.

P2790’s picture

Hi Dom, your most recent patch throws an error, the one previous works.

patching file views-infinite-scroll.js
patch: **** malformed patch at line 16:    };
P2790’s picture

This patch removes the initial results of the view and replaces it with the new results.

timb’s picture

I encountered this problem when using a view header in my view with infinite scroll turned on. I was able to work around the issue by making my header view into a block, then inserting it into the top of the content section of the view via the block system.

Robert_T’s picture

See the patch at https://www.drupal.org/node/2736419. That solved this problem for me.

SocialNicheGuru’s picture

Status: Needs review » Needs work

Can't apply

git apply view_in_another_view_header--2457893-5.patch
fatal: corrupt patch at line 17
patch -p1 < view_in_another_view_header--2457893-5.patch
patching file views-infinite-scroll.js
patch: **** malformed patch at line 16: };

nevergone’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#2736419: Views infinite scroll doesn't work with nested views

Related issue added with RTBC.