After cache clear, the Load more buttons works perfectly, for exactly one cycle through all the "pages" of more items. However, if I reload the page at any point and try to use the load more button again, no new items appear.

Clicking the button definitely causes something to happen, as my browser shows the DOM being manipulated, but no new results are added to the set. The VIew More link itself is correctly updated. The URL that initially contained "?page=1" contains "?page=2" after the click, and so on, until all there are no more results. The problem is that all the subsequent "pages" of results are never appended to the first set!

Here's a video: https://www.screencast.com/t/p2O1tkW8Pl8N (please excuse the poor audio)

Comments

jenlampton created an issue. See original summary.

jenlampton’s picture

Issue summary: View changes

I don't think my theory about the dom ID being different on subsequent page loads is the culprit. I removed that check and there was no change.

jenlampton’s picture

Okay, I think I'm onto something now. After cache clear, the results returned from the views-more query use the class "view-content" but when there is no cache clear, they use the class "content". The "content query" of > .view-content won't match if that class is not being used.

jenlampton’s picture

Project: Views Load More » Views
Version: 7.x-1.x-dev » 7.x-3.x-dev
Component: Code » Miscellaneous
Priority: Major » Normal

Yeah, okay. So this site currently has several themes. Even though the initial displays of this view load using theme #3 after cache clear, any subsequent ajax calls render the results using theme #2, which had changed the class from "views-content" to "content". I'm not sure how to get views to render the ajax results using the correct theme, but that seems like a views problem and not a views_load_more problem.

jenlampton’s picture

Title: The Load More button only works once (after cache clear) » Ajax results render using incorrect theme (except after cache clear)

Updating issue title.