Pager show more is hidden although there are more items to show

Created on 30 March 2020, over 4 years ago
Updated 6 July 2023, over 1 year ago

In my case, I configured my view to be as below.

  • Initial items: 4
  • Items to display: 8
  • Offset (number of items to skip): 0

I have 29 items to show, on the 3rd page the show more button is hidden although there is one more item to show.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇯🇴Jordan ammar qala

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India dipayanpramanik5 New Delhi

    Does anyone resolves this issue. I am facing the same issue in d9

  • 🇵🇪Peru jeeba

    I got the same problem over here.I'm using the DEV version.

  • 🇬🇧United Kingdom joehuggans Harrogate, UK

    Seeing this in Drupal 9 also, works fine if not using Ajax on your view.

    The ajax command viewsShowMore seems to be running twice, the second time it runs $($.parseHTML(response.data, document, true)) is empty.

    But then even if you force it to just run once, there is still the issue of it not showing the last page, which #7 fixes but not sure if this is the proper way to handle this.

    This module is broken when using AJAX.

  • First commit to issue fork.
  • @ramprassad opened merge request.
  • 🇮🇳India ramprassad

    Fixed the issue in the Views Show more module and opened a merge request.

    The issue is that when you click Show more initially you can see in the AJAX response there are 2 viewsshowmore callbacks - one with the data and the other with empty data which means viewsshowmore gets called twice. This happens when you use the normal pager which calls "insert" command.

    The fix adds the if empty check for the newcontent in viewsshowmore AJAX Command similar to the core misc.js for the 'insert' AJAX Command.

  • 🇺🇸United States jim22

    Thanks, ramprassad! Your updates seem to be working for me. I created a patch from your fork so I could test it. Will attach it for anyone else that needs it.

  • Status changed to RTBC over 1 year ago
  • ivnish Kazakhstan

    The patch #12 works

  • Status changed to Fixed over 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024