-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: elem is undefined - custom query #779
Comments
if you go to that link you will see a var_dump of count($query->posts) which means the query does return the correct amount of posts for next page but it does not display them which is the job of infnite-scroll |
Thanks for reporting this bug. I'm not seeing it occur when I visit. Were you able to resolve this? |
Hi, Sorry, my client changed a setting. Let me put back the right setting. |
ok, its back if you want to check. I have debug set to true |
Thanks for that. Looks like you're running into a bug with Infinite Scroll because the second page does not contain any elements used for append: '.uf-grid-item', Two fixes. 1 add InfiniteScroll.prototype.onAppendHistory = function( response, path, items ) {
if ( !items || !items.length ) {
return;
}
var firstItem = items[0];
var elemScrollY = this.getElementScrollY( firstItem );
// resolve path
link.href = path;
// add page data to hash
this.scrollPages.push({
top: elemScrollY,
path: link.href,
title: response.title,
});
}; I'll be adding this fix in the next release. |
🎉 v3.0.4 has been released with this fix added. Please update! |
Hi Desandro,
Hope you well. I am not 100% sure what this error means but I really cant see a solution for this so perhaps might be some kind of bug?
I have a custom wordpress query for which I get the correct return from server but then infinite scroll gives me TypeError: elem is undefined when loading next page.
http://www.dawaf.co.uk/usfew/site/page/2/
Can you please see what is going on here?
Thank you in advance!
The text was updated successfully, but these errors were encountered: