Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hello,
I'm trying to use the module on a view and it doesn't seem to work.
looks like the $pager_total is always 1 and so the pager isn't activated.
what could cause this?
this happens with a view with lots of rows.
Thanks
Idan
Comments
Comment #1
arbel CreditAttribution: arbel commentedOk, this isn't really an issue with infinite scroll but with views.
I had a view where each row had a view in it. this caused the pager not to appear in the "outer" view, if the "inner" views had a pager set.
But after resolving that the infinite scroll had trouble selecting the content, or rather selected to much, and appended the loaded content after each "inner" view.
I resolved this by changing this:
views_infinite_scroll.js (line24)
var content_selector = 'div.view-id-' + settings.view_name + '.view-display-id-' + settings.display + ' ' + settings.content_selector;
to
var content_selector = 'div.view-id-' + settings.view_name + '.view-display-id-' + settings.display + '>' + settings.content_selector;
and on views_plugin_pager_infinite_scroll.inc (line 38)
$content_selector = ' div.view-content .item-list > *';
to
$content_selector = ' div.view-content>.item-list > *';
simply made the selector more specific.
thanks
Idan
Comment #2
bryancasler CreditAttribution: bryancasler commentedHmmm.... seems to be even more generic than that. I have a view with "infinite scroll" displaying a content type's teaser view. That teaser view has a view pane in it.
The teaser setup (screenshot: http://snpr.cm/OeEXlL.png)
-A look at the "Artwork Description as a Link" view (screenshot: http://snpr.cm/wzlQVw.png)
A look at the infinite scroll view "Art Teaser Listing" (screenshot: http://snpr.cm/taO6EO.png)
The above patches didn't seem to help. I'm still getting several loading gif's on the screen at the same time. Basically one is appearing below each "view" that is on the screen.
Screenshot: http://snpr.cm/E6oy6A.png
You can see the bug live at (http://matttucker.onedogdevelopment.com/). Just scroll down.
The big thing is that the "Artwork Description as a Link" view doesn't even have a pager. So I'm completely unsure about why it's even being targeted.
Comment #3
bryancasler CreditAttribution: bryancasler commentedOk, so I figured out a solution based off of some of what was included in #1. Didn't even need to touch "views_plugin_pager_infinite_scroll.inc"
In views_infinite_scroll.js on lines 24-31
Change this...
...to this...
Now everything is working just fine.
Comment #4
bryancasler CreditAttribution: bryancasler commentedChanging status
Comment #5
Remon CreditAttribution: Remon commentedExcellent investigation guys! I'm going to commit that ASAP.
Comment #6
bryancasler CreditAttribution: bryancasler commentedsweet! I'm always glad when I can help and contribute.
Comment #7
Remon CreditAttribution: Remon commentedCommitted in 6.x-1.x and 7.x-1.x
http://drupalcode.org/project/views_infinite_scroll.git/commit/369ec27
http://drupalcode.org/project/views_infinite_scroll.git/commit/8842f54
Thanks animelion and arbel for your efforts :)