Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
I'm using Views Infinite Scroll with some exposed filters, and "Use Ajax" is set to "Yes". If I choose a combination of filters that will result in no results being returned and then click "Apply", I get the following Javascript error:
Uncaught TypeError: Cannot read property 'top' of null
Drupal.behaviors.views_infinite_scroll.attach @ views_infinite_scroll.js:76
Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2556715-1.views_infinite_scroll-ajax.patch | 624 bytes | jrb |
Comments
Comment #2
jrbPatch attached.
Comment #3
vood002 CreditAttribution: vood002 commentedThis patch solved the problem for me, ty!
Comment #4
Baysaa CreditAttribution: Baysaa commentedI couldn't get the views Preview working when the display has Infinite Scroll as the pager set. Patch at #2 fixes my issue. However, the JS error still appears in the console log (although it doesn't break Views admin).
This time the message is generated from jquery.autopager.js around line 133:
Uncaught TypeError: Cannot read property 'top' of null
Comment #5
Honza Pobořil CreditAttribution: Honza Pobořil as a volunteer commented7.x-1.x will receive no work. Migrate to 7.x-2.x.