I can't tell what exactly happens, but

1) it doesn't trigger any error
2) there is only one page loaded according to Chrome Dev Tools: XHR finished loading: "http://..../front?page=1". jquery.js:8416
3) scrolling further doesn't load anything

I tried it with both jQuery 1.7 and 1.8 // jQuery UI Core 1.10.2
Views version: Git version.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

OnkelTem’s picture

Issue summary: View changes

Updated issue summary.

OnkelTem’s picture

Priority: Normal » Critical

This is of course critical since it breaks module functionality.

OnkelTem’s picture

Issue summary: View changes

Updated issue summary.

OnkelTem’s picture

Issue summary: View changes

Updated issue summary.

OnkelTem’s picture

Also error message appears in js console in Views admin UI:

Uncaught TypeError: Cannot read property 'top' of undefined

Screenshot:
10.png

funkDoc’s picture

I had this same issue here:
http://drupal.org/node/1952764

My fix was to enable the "more" link and change the pager ID. Again no idea why either are necessary but that seemed to fix it.

OnkelTem’s picture

I found several problems and almost fixed them. I will post a patch today.

alexolder’s picture

Any luck with a patch? I'm having exactly the same problem.

SuperEngineer 64’s picture

Same error here in germany :p.

But here its a little different (and i guess you otheres have the same problem).
Its not, that there is just the first page loaded, the issue is, that the module just works ONE time, I guess.

Example: Build a view and set its Inifinit-Items to a number (x), that the displayed rows nearly not reaching the bottom of the div. The module will recognize that and say "Hey, theres mor space!" and will load the second stack of (x). But after that, nothing happend. If your scrolling to the end - the modul did not recognize it anymore.

So I guess the problem is, that the module just works one time. A second reload (to page 3) dont works.

EDIT: Here is some hint: If you reached the bottom or your view, then go outside with the mouse and scroll one time up. The view will then reload the next stack. Strange..

chrisjlee’s picture

having this problem as well

BD3’s picture

Same here and unfortunately #3 does not fix it for me.

alesr’s picture

Got this one today too.
When scrolling down I get this error in Javascript console:

Uncaught TypeError: Cannot read property 'top' of null jquery.autopager-1.0.0.js:134
loadOnScroll jquery.autopager-1.0.0.js:134
c.event.handle jquery.js:64
h.handle.o

It's weird because it was working ok for me when I last tried Views Infinite Scroll months ago.
Can it be related to Views updates?

ckt.orange’s picture

Having the same issue, won't load more when scrolled down,
checked with Firebug, gave me an

TypeError: content is undefined

ckt.orange’s picture

Found the issue, please don't use semantic view for the Format, it's a third party module and doesn't compile with view infinite scroll.
I changed my format to unformatted list and it works fine.
Not sure about other format, you may try it yourself.

servantleader’s picture

Same problem. #3 did not work. #11 does not apply as that module is not used for D7.

EndTheFederalReserve’s picture

#3 did not work for me.

#11 did not work for me.

July 18th 2013 and I've scoured all corners of the Internet .. is there a fix for D7 or are we stuck in the stoneage of D6 or abandoning D all together?

EndTheFederalReserve’s picture

I do believe this is a Javascript error with the Autopager according to my Firebug console error:

TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)
TypeError: content is undefined
[Break On This Error] 	

...ntent.offset().top + content.height() < $(document).scrollTop() + $(window).heig...

jquery...?mq50g0 (line 134)

and it seems to specifically cite the 2nd line of code of this function

 function loadOnScroll() {
if (content.offset().top + content.height() < $(document).scrollTop() + $(window).height()) {
$.autopager.load();
}
} 

Any Javascript baddies on here to patch this up or is the issue more complex? Similar issue for others?

Hundreds of you are reading this, few are chiming in, lets find a solution today

EndTheFederalReserve’s picture

I discovered a solution.

Change your format to HTML List.

You will need to reformat your HTML/CSS to view properly but the autopager will work.

Overall: the plugin works but there are a hornet's nest of bugs needing to be fixed that would only make this smoother but for your application it will in fact work.

Now that I have autoscroll working, it still shows "page 1 of 18" and a 'next' button for example but I will solve this with CSS display:none; to hide the pagination content.

EndTheFederalReserve’s picture

I also must note I do have 'yes' for the 'more' link selected however there is no more link. I could remove this but I'm so happy with it working I will let someone else try this and post and enjoy the working autopager in the meantime.

Peace

EndTheFederalReserve’s picture

Issue summary: View changes

Updated issue summary.

tahiticlic’s picture

Well investigating a bit show that the JS is waiting for a predefined DOM structure (lines 24 to 29 of views_infinite_scroll.js). So if you've your own structure (custom templates for instance) or even if you use custom classes in views definition (for instance removing "item-list" class applyed by default to the html list display), the JS is unable to find the content...

I guess the right way to deal with this would be to add a selector field in the views plugin attributes, so that if filled this is this value taht will be used, and if not filled the default value would be used.

parvind87’s picture

Issue summary: View changes

In my case, I had added the extra class including 'item-list' into - "Wrapper class " for Format: HTML list setting. That extra class was creating problem.
I have removed that extra class and problem get fixed.

seanB’s picture

Just spent a day looking into this. In my case for some reason the window.scroll event just stops firing? It works fine in other places, can't really figure out whats going on.

Changing the $(window).scroll() functions to $(document).scroll() fixed it for me in the autopager plugin (libraries/autopager/jquery.autopager-1.0.0.js).

It's not the best fix, but at least it works.

Honza Pobořil’s picture

Status: Active » Closed (outdated)

7.x-1.x will receive no work. Migrate to 7.x-2.x.