Infinite scroll divs always added, even view is empty

Created on 3 March 2021, about 4 years ago
Updated 23 June 2023, almost 2 years ago

When a view is empty, you can normally set a 'empty behavior' if the view is empty. But because Infinite Scroll always adds some divs, the view thinks there's content, and it doesn't show the empty behavior. Though it looks empty, because there's nothing to see.

πŸ› Bug report
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

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.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Is this still an issue with 2.0.x? If yes, please update the version and set the status active again with clear steps or (best) with a test showing what's broken.

    2.0.x is the active development branch.

    If nobody replies, we should assume this is fixed and close this issue outdated.

    Thanks!

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    This please first needs a simple test to prove.

  • πŸ‡ΊπŸ‡ΈUnited States varunity Washington D.C.

    There was a similar issue on version 2.0.2, basically a view used for a search page that had a search term as an exposed filter was set to display all indexed content by default. On the last "page" of results it would create an infinite number of empty divs.

    The quick solution was to change it from showing all indexed content by default to instead have the search field be required and display nothing.

    I do suspect the issue is with the pager. In InfiniteScroll.php the getNumberItemsLeft() function assumes a $total number of items in order to calculate the remaining items to display when on the second to last page.

Production build 0.71.5 2024