Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I scroll to the bottom of the page, new content loads like it should, but it messes with the format really bad. It might just be me doing something stupid, but it was working previously. Example: http://heybuy.me
Any help fixing this would be appreciated.
Comment | File | Size | Author |
---|---|---|---|
#8 | views_infinite_scroll-classes_need_fixing_after_pager_load-1546066-8.patch | 2.81 KB | MustangGB |
Comments
Comment #1
Remon CreditAttribution: Remon commentedCould you please paste an export of that view?
Comment #2
disillusion CreditAttribution: disillusion commentedSurely, here you go.
Comment #3
Remon CreditAttribution: Remon commentedAlthough I don't have similar content types to yours, but everything looks fine and new items are appended correctly. Could you create a new view with similar settings but without theming?
Comment #4
disillusion CreditAttribution: disillusion commentedThat'd probably work, but why is it altering the content output so drastically?
Comment #5
Po3t CreditAttribution: Po3t commentedI think I know what the problem is. The appended code isn't creating correct views rows. Here's what my output looks like:
The autopager is set to show 5 rows, then load the next 5 rows. As you can see, the first 5 rows output correctly, but then the next 4 aren't listed correctly. "views-row-5" should lose the "views-row-last" class once the new rows have been added, and the next row should be "views-row-6" instead of resetting to 1 again. I'm not sure why the row numbers are being duplicated though.
This is probably why the OP's formatting is getting all messed up. CSS classes for "views-row-first" and "views-row-last" are getting applied to rows that aren't first or last.
Comment #6
Po3t CreditAttribution: Po3t commentedActually, I think my issue may actually have to do with the fact that I'm using "Views Field View". Coupled with Views Infinite Scroll, the Field Views are being listed as their own top level rows instead of being inside of the parent row. I think my issue might be associated with this issue: http://drupal.org/node/1343836
However I'm using the latest released version of Views Infinite Scroll (April 23, 2012) and it's generating the aforementioned results.
The reason those rows are duplicating is because the middle two rows are actually supposed to be inside of the top row. The last row is actually supposed to be the row after the top row. The two middle rows should be inside of the first "views-row-1".
Is this possible to fix?
Comment #7
disillusion CreditAttribution: disillusion commentedYeah this is still not working at all for me. Your help might be able to help me patch it up temporarily. Is there an easy way to find older versions? I installed an older one with the web interface, so I don't have a copy. As I said, it used to work fine.
Comment #8
MustangGB CreditAttribution: MustangGB commentedIn my opinion because multiple pages are being loaded on the same screen we should be dealing with their classes as well. The attached patch was made against 6.x-1.x-dev, however it only deals with the "Grid" style as this was the combination needed for my implementation. The switch statement needs expanding to include code that supports the other styles as well.
In should also be noted that the approach taken in this patch is to override all existing classes with those generated by views_infinite_scroll. This loses any customised or additional classes, which maybe undesirable from a themers prospective. It would be better to implement this in a slightly modified way that preserves these.
Comment #9
Honza Pobořil CreditAttribution: Honza Pobořil as a volunteer commented