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.
Hi, after installing and configuring paging of a view for use of this infinite scroll, I can notice that it does not work. It puts its js file on top of the others drupal js files (before jquery too), and prints on console that "jQuery is not defined" (obviously if it loads before it).
Is there something that I should set somewhere and I don't know? Can't figure it out
Thank you
Comment | File | Size | Author |
---|---|---|---|
#8 | issue-2752265.patch | 768 bytes | g.anedda |
Comments
Comment #2
g.anedda CreditAttribution: g.anedda commentedComment #3
g.anedda CreditAttribution: g.anedda commentedComment #4
saurabh.dhariwal CreditAttribution: saurabh.dhariwal at AddWeb Solution Pvt. Ltd. commentedIts working proper from my end. Please check following link: https://forum.jquery.com/topic/and-jquery-not-defined-problems
Hope it helps you.
Thanks!
Comment #5
sozkara CreditAttribution: sozkara commentedI have the same problem too. No matter what i tried, views-infinite-scroll.js loaded before jquery.min.js.
Comment #6
sozkara CreditAttribution: sozkara commentedComment #7
g.anedda CreditAttribution: g.anedda commentedI found out that testing the module with a default theme it works.
Checking more inside my theme, I noticed that in the html.tpl.php I print the variable $page_bottom before $scripts. And it seems that views-infinite-scroll.js is being loaded in $page_bottom instead of $scripts as it should be, I think.
So I solved inverting the order: print $scripts before $page_bottom because it does not cause any problem.
Only remains the fact that I don't understand why that js is printed in $page_bottom instead of inside $scripts
Comment #8
g.anedda CreditAttribution: g.anedda commentedSeems that at line 86 the part ", array('scope' => 'footer')" puts the js in the $page_bottom variable instead of $scripts.
Now the module acts as it should
Comment #9
g.anedda CreditAttribution: g.anedda commentedComment #10
Aaron Thain CreditAttribution: Aaron Thain as a volunteer commentedI applied the patch and infinite scroll continues to load ALL content at once.
Comment #11
oranges13This patch worked for me with 7.x-2.0