Problem/Motivation

As of 9.3.0 it seems that when utilizing the Load more pager plugin when clicking to the second page of results you're redirected to a 404.
This appears to be a side effect of some sort of deprecation to the jquery/jquery.once libraries.

Similar issues seem to exist in Views Show More and Infinite Scroll:

Steps to reproduce

Create a View with more than 2 pages of results and add a "Load more" pager to that View. Click the "load more" button twice.

Proposed resolution

Adjust the library and js to utilize the core/once library.

CommentFileSizeAuthor
#2 3258966-2.patch1.22 KBgcalex5
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gcalex5 created an issue. See original summary.

gcalex5’s picture

StatusFileSize
new1.22 KB

This patch seems to resolve the issue.

gcalex5’s picture

Status: Active » Needs review
n_nelson350’s picture

Team,

The patch fixes the ajax 404 issue but the contents are not appended on the page although the result response is retrieved in the ajax call.

Anyone has faced the same issue, please provide your resolution for this.

Thanks in Advance.

adsyy’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

I tried the patch too and didnt face your problem @n_nelson350. After two click, the content is append on the page.

kkalaskar’s picture

#2 Patch worked for me as well.

alina.basarabeanu’s picture

I can replicate the issue.
Clicking a second time on the 'Load more' button I get a page not found and redirected to /views/ajax?page=2

Applying the patch from #2 fixed the issue. I can view multiple pages by clicking the button multiple times.

anybody’s picture

Version: 2.0.0-alpha1 » 2.x-dev
Assigned: gcalex5 » Unassigned

Patches should always be against the dev branch. :) Didn't test this.

Kirst25 made their first commit to this issue’s fork.

kirst25’s picture

Re-applied the patch as it wasn't applying to the 2.x dev branch.

lbrassaw’s picture

I applied the patch and didn't work at first. Realized I was on 2.0.0-alpha1 instead of 2.x-dev. Once I switched to 2.x-dev, it worked brilliantly. Thanks!

bbombachini’s picture

This issue has also been addressed on https://www.drupal.org/project/views_load_more/issues/3290508 so if we could prioritize that one as it's also making the module D10 ready, it would be better.

i-trokhanenko’s picture

Status: Reviewed & tested by the community » Fixed

Committed to this issue #3290508: Automated Drupal 10 compatibility fixes and released a new version of the module. Thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.