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

CommentFileSizeAuthor
#8 issue-2752265.patch768 bytesg.anedda
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

g.anedda created an issue. See original summary.

g.anedda’s picture

Issue summary: View changes
g.anedda’s picture

Title: Jquery and Grid not defined » Jquery not defined
saurabh.dhariwal’s picture

Its working proper from my end. Please check following link: https://forum.jquery.com/topic/and-jquery-not-defined-problems

Hope it helps you.

Thanks!

sozkara’s picture

I have the same problem too. No matter what i tried, views-infinite-scroll.js loaded before jquery.min.js.

sozkara’s picture

Category: Support request » Bug report
Priority: Normal » Critical
g.anedda’s picture

Status: Active » Needs work

I 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

g.anedda’s picture

FileSize
768 bytes

Seems 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

g.anedda’s picture

Status: Needs work » Needs review
Aaron Thain’s picture

I applied the patch and infinite scroll continues to load ALL content at once.

oranges13’s picture

This patch worked for me with 7.x-2.0