Problem/Motivation

As documented in #2761373-3: Integrate with Views Infinite Scroll 7.x-2.x the views header does not seem to be supported. Follow 1st 5 steps in that linked issue to reproduce, namely:

- On a fresh install, generate a load of content and enable views_infinite_scroll (2.x).
- Create a simple view of content (50 items, paged at 10) and infinite scroll. Add some text to the view header.
- Infinite scroll works as expected.
- Make another view to act as the "filter". Simple html-list of taxonomy terms. Add this to the header of the content view.
- Content view now breaks. As I scroll down the page, I get the view header duplicated with each new block of content that is loaded. Also, each time the whole result is appended. So On the first scroll, twenty items (with header) are appended, on the next scroll thrity are appended, etc.

This seems to be due to method differences between 1.x and 2.x as alluded to in this support request: #2761547: Why does 1.x append rows and 2.x replace the whole view?.

Proposed resolution

Append new row data only, rather than entire view.

Remaining tasks

As above.

User interface changes

API changes

Unknown

Data model changes

Unknown

Comments

mccrodp created an issue. See original summary.

saurabh.dhariwal’s picture

StatusFileSize
new47.28 KB
new63.17 KB
new700 bytes

Please find the attached patch "views_header_is-2764125-2" which works fine as per your requirements.

Let me know if any query/concern for the same.

saurabh.dhariwal’s picture

Assigned: Unassigned » saurabh.dhariwal
Status: Active » Needs review
mccrodp’s picture

Assigned: saurabh.dhariwal » Unassigned

That's great @saurabh.dhariwal. Thank you. Hope to test this soon. (I think you assign while working on it and set to unassigned when it needs review, etc.?)

saurabh.dhariwal’s picture

Sounds good! Would be awaiting for your inputs. Keep me updated once this is tested.

Thanks!

Robert_T’s picture

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