I got the module installed and running, but I had the following problem:
After the page is loaded, the pager is there (which is how it should be). When I click it, it loads the new records by AJAX , also as expected. But the problem then is that the newer pager doesn't show up, although it is sent by drupal.

I did some digging and found that there was a problem in the JS file, where it attempts to place the new pager in an element that doesn't exist.

Here's a little patch to fix this:

--- views_load_more.js	(revision 359)
+++ views_load_more.js	(working copy)
@@ -55,7 +55,7 @@
 
     // Add the new content to the page.
     wrapper.find('.pager a').remove();
-    wrapper.find('.pager').parent('.item-list').html(new_content.find('.pager'));
+    wrapper.find('.pager').replaceWith(new_content.find('.pager'));
     wrapper.find(content_query)[method](new_content.find(content_query).children());
     if (effect.showEffect != 'show') {
       wrapper.find(content_query).children(':not(:visible)')[effect.showEffect](effect.showSpeed);

PS. This patch is against the dev version.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

khaled.zaidan’s picture

Status: Active » Needs review
khaled.zaidan’s picture

any news here?
This issue is still there in the new dev version

ericduran’s picture

Status: Needs review » Reviewed & tested by the community

This makes sense.

Not sure why you're having issues with this in the 1st place, my guess is the item-list is different for some reason, that being said the code changes seems better anyway.

jide’s picture

Status: Reviewed & tested by the community » Fixed

Seems this has been committed.

jide’s picture

Status: Fixed » Reviewed & tested by the community

Woops ! No in fact, sorry.

TravisWeihermuller’s picture

I had this same issue even after the fix, it was caused by displaying full content with comments. once I took the comments off it loaded just fine. I believe the comments pager was interfering with the views pager. Hope that helps.

agalitsyn’s picture

Please commit it to dev version. Annoying problem

rooby’s picture

This is a duplicate of #2000572: Pager Link not appended and #1806422-30: Works only once, but with a slightly different approach (and no actual patch file).

Up to the maintainer as to chich approach is preferred.

opdorp’s picture

Same problem! this fixed it for me!

maijs’s picture

@khaled.zaidan, thanks, it seems your solution makes this module work as expected.

maijs’s picture

I'm attaching the patch created by @khaled.zaidan so it can be tested by downloading the file.

cameron prince’s picture

I can confirm that the patch from #11 resolves the problem.

5n00py’s picture

Confirm! Waiting in 7.x-1.x

JordanMagnuson’s picture

Confirmed: #11 works.

sw3b’s picture

#11 work for me also !

sashken2’s picture

Confirmed: #11 works good for me.

himerus’s picture

Confirmed: #11 works.

aether’s picture

Yes. #11 works.

bshaddad’s picture

Confirmed: #11 solved the issue.

rp7’s picture

Issue summary: View changes

Confirmed, #11 works

Rade’s picture

#11 works, but the patch does not work on the current dev anymore as the line number have changed. Adding updated version that works on 7.x-1.2 and the current dev. Props still go to khaled.zaidan :)

Cyberschorsch’s picture

#21 is working beautiful

mglaman’s picture

#11/#21 worked! Thanks

basvredeling’s picture

#21 is RTBC (status has been since #5??)

zmove’s picture

Patch correct the button disappearing after the first ajax refresh.

However (don't know if it's related but I think yes) if you use Waypoint with infinite scroll option, it will works the first time only.

zmove’s picture

Status: Reviewed & tested by the community » Needs work

I put this issue to need work for infinite scroll problem.

SocialNicheGuru’s picture

remove is not a function in jquery wayports 2.0+
https://drupal.org/node/1889300

indydas’s picture

Yeah with 7.x-1.2 set up on mine the button disappears even with infinite scroll disabled as pointed out in #25.

tregismoreira’s picture

#21 works for me. Thanks!

Rajab Natshah’s picture

#11 works .. Thanks :)

Nicolas Bouteille’s picture

Priority: Normal » Major
Nicolas Bouteille’s picture

#21 solved the problem for me too thanks!
I think this is a blocking thus major problem and I can't believe it's been reported since june 2012 and still not committed... two years for a blocking bug single-line-fixed? We can do better than that can't we?

rollingnet’s picture

I subscribe for patch #21 to be committed
it works

jiv_e’s picture

Confirming that patch #21 works. I used Display Suite to create Views rows.

jiv_e’s picture

Status: Needs work » Reviewed & tested by the community
heshanlk’s picture

#21 works fine.

s_leu’s picture

Can also confirm patch in #21 is working fine. Please commit.

ocastle’s picture

#21 Fixed it for me too. Thanks.

gausarts’s picture

#21 RTBC as well. it also works with Omega 4 which removes the item-list wrapper, good catch not to depend on the wrapper. Thanks.

m4olivei’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Hello all. Thanks for the work on this issue. I just picked up co-maintainership and have been reviewing the issue queue.

As far as I can tell, this issue should be fixed by #1919896: Does not work correctly with nested views. I've committed that to 7.x-1.x-dev since it seems to have fixed this issue while at the same time considering that case where views are nested (attachments). Please checkout the latest on 7.x-1.x branch and let me know if it fixes your issue :).

Feel free to re-open if it's still affecting you.

Thanks,
Matt

FreekVR’s picture

Status: Closed (fixed) » Needs review

The latest dev-branch, or applying the patch in #1919896: Does not work correctly with nested views, causes more issues than it solves (please see my comment in aforementioned issue).

The patch in #21 works flawlessly on the lastest stable, however.

  • m4olivei committed 3bf4445 on 7.x-1.x
    Issue #1644036, #2327947, #1919896 by many contributors: Fixed Pager...
m4olivei’s picture

I've incorporated the patch here into the latest 7.x-1.x branch. Please checkout the latest 7.x-1.x branch to see if it's working for you.

m4olivei’s picture

Status: Needs review » Closed (fixed)