After update to Drupal 8.4 VIC replace results instead of appending

Created on 24 October 2017, over 6 years ago
Updated 11 July 2023, 12 months ago

After update to Drupal 8.4 Views Infinity Scroll replaces view with new set of results instead of appending it. Instead of showing 9 + 9 + 9 etc. (total 27 tiems) it basically now it works as pager showing 9 items, then next 9 items and etc. (always only certain amount of items).

🐛 Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 8
    last update about 1 year ago
    Composer error. Unable to continue.
  • @grevil opened merge request.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 8
    last update about 1 year ago
    Composer error. Unable to continue.
  • 🇩🇪Germany Grevil

    Switching to an issue fork workflow.

  • 🇩🇪Germany Anybody Porta Westfalica
  • Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 8
    last update about 1 year ago
    Not currently mergeable.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 8
    last update about 1 year ago
    Composer error. Unable to continue.
  • 🇩🇪Germany Grevil

    Since patch "filter-nested-views-2918352-30.patch" doesn't work any more in conjunction with the latest patch of 🐛 Drupal.views.ajaxView is not initializing pagers in nested views Needs work , I manually applied the last RTBC'd patch (filter-nested-views-2918352-19.patch) to this issue's fork, as no other patch after that patch provided an interdiff, it is hard to tell if it introduced any regression.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 8
    last update about 1 year ago
    Composer error. Unable to continue.
  • 🇩🇪Germany Grevil

    Alright, fixed the upstream core issue for 11.x! Works great, with the changes from the issue fork. Now we need to backport 🐛 Drupal.views.ajaxView is not initializing pagers in nested views Needs work to 10.1.x, create tests here and create a new SemVer branch, based on the Drupal version 🐛 Drupal.views.ajaxView is not initializing pagers in nested views Needs work gets commited to.

  • 🇩🇪Germany Anybody Porta Westfalica

    Thanks @Grevil for working on this! The good news is, that it even works without the core patch, which simplifies things a lot. Even with the core patch, it still works, as @Grevil confirmed.

    So we only need a test now to prove it works and didn't work before and then we can finally fix this old major issue!

    Attaching the current MR state as static patch for composer.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    1 pass, 2 fail
  • 🇩🇪Germany Anybody Porta Westfalica

    Hiding all patches to proceed in the MR finally.

  • 🇩🇪Germany Grevil

    Interesting, the tests do not run at all under Drupal 10 and fixing the test theme, will make them "properly" fail:

    1) Drupal\Tests\views_infinite_scroll\FunctionalJavascript\InfiniteScrollTest::testInfiniteScroll
    Failed asserting that 0 matches expected 3.

    /var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:96
    /var/www/html/web/modules/custom/views_infinite_scroll/tests/src/FunctionalJavascript/InfiniteScrollTest.php:127
    /var/www/html/web/modules/custom/views_infinite_scroll/tests/src/FunctionalJavascript/InfiniteScrollTest.php:62
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

    (without the changes from this issue)

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 8
    last update about 1 year ago
    Composer error. Unable to continue.
  • 🇩🇪Germany Grevil

    I don't get it, "testInfiniteScroll()" inside "tests/src/FunctionalJavascript/InfiniteScrollTest.php" should already fail right now... but it doesn't for some reason...

    Here is a patch with only the tests adjusted, but without the changes from this issue (which should fail rn).

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 8
    last update about 1 year ago
    2 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.2 & MySQL 8
    last update about 1 year ago
    2 pass
  • 🇩🇪Germany Grevil

    My apologies, the test doesn't specifically test views inside views...

    That's why the tests succeed.

  • Status changed to Postponed: needs info 12 months ago
  • 🇩🇪Germany Grevil

    Ok, @Anybody and I just tested this extensively, and it seems the problem doesn't exist anymore for 2.0.x!

    We used the drupal core "glossary" view and changed the pager to use infinity scroll, and everything worked as expected!

    These are the pager settings we used:

    Pager
    Use pager: Infinite Scroll | Click to load, 1 item
    
    More link:
    No
    

    After I got on the "/glossary" page and pressed "Load more" a few times, this was the output:

    Note, that the duplicate table headers are unrelated (This is a different issue 🐛 Headers in table format repeat on load more instead of adding rows Needs work ).

    This might still be an issue related to 8.x-1.x, so I will set the version appropriately and postpone this issue, for people to still see this issue, when running into this again.

  • Status changed to RTBC 12 months ago
  • 🇧🇬Bulgaria vuil Bulgaria 🇧🇬 🇪🇺 🌍

    The issue does not exist in the latest 2.0.x branch. But it can be committed into 8.x-1.x branch.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 8
    last update 12 months ago
    Composer error. Unable to continue.
  • Status changed to Needs work 12 months ago
  • 🇩🇪Germany Anybody Porta Westfalica

    @Grevil: See #43 - what should we do here?
    I don't think we should touch 8.x-1.x.

    Still there are changes in the MR against 2.x?

  • 🇩🇪Germany Anybody Porta Westfalica

    @Grevil: Without the fixes here, the tests in 2.x are broken... so should we merge this into 2.x or better create a separate issue to fix the tests and close this one as the issue seems to be fixed in 2.x as of #43?

  • Status changed to Closed: cannot reproduce 12 months ago
  • 🇩🇪Germany Grevil

    Yes, the issue is fixed and not present anymore in 2.0.x. Drupal 8 is EOL, so we shouldn't make any changes inside 1.x anymore.

    Apart from the theme switch, nothing in here is worth committing.

    Let's close it.

  • 🇩🇪Germany Anybody Porta Westfalica

    Ok, should someone encounter the same in 2.x, feel free to reopen with clear steps to reproduce. Thanks!

  • 🇮🇳India Shreya_13

    We used the drupal core "glossary" view and changed the pager to use infinity scroll, and remaining things as expected.

    We also tested all formatters with only the pager set. That also worked just fine.

Production build 0.69.0 2024