Views-Pager sometimes missing when the Views pager ID has a collision with the comment pager ID

Created on 12 January 2016, almost 9 years ago
Updated 16 February 2023, almost 2 years ago

I got some strange Issue with views Pager missing sometimes in Views-ui and on View pages (at least). Happening using Pager-Mini and Pager-Full (at least).
It happens with various views and seems to depend on User/session.
(Missing means: items=NULL in html/core/themes/classy/templates/navigation/pager.html.twig)

* When I add ?page=0 to the url the pager will appear. It will also appear, when other Pages are selected.
* When I'm logged out it will appear again.

Seems hard to reproduce and I have no clue how I made this happen.

A few possible factors:
- Using Display Suite (not sure, some reported this fault while using DS)
- Content type has comments (without comment, the pager appears)
- The Pager ID configured in the view (with higher ID, the pager appears)
- (Not) logged in users (pagers (dis)appear for (non) logged-in users)

πŸ› Bug report
Status

Closed: works as designed

Version

9.5

Component
ViewsΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡©πŸ‡ͺGermany digitaldonkey

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.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Two years a maintainer asked for more information about this problem, including steps to reproduce. The same information was asked for again, 6 months ago. Since we need that information to continue here, and it is has not been supplied I am closing this issue.

    If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue β†’ (starting from "Install Drupal core").

  • Status changed to Postponed: needs info 21 days ago
  • πŸ‡ΊπŸ‡ΈUnited States jnicola

    Just ran into this in 10.3.x with views on the USDOJ website where the pager would sometimes not render without a discernable rhyme or reason. Sure enough, adjusting the pager ID to 99 ensured that there weren't issues.

    I don't have steps to reproduce from scratch, nor the liberty of time to faff around with reproducing this, but the pager ID collision does appear to be something that can still happen.

    Stands to reason you could perhaps write a test for this that has a view rendering content, some of which has a pager on it, and both using the same pager ID of 0, but the view in the content pager is empty, which in turn bubbles up to the overall view pager ID.

    I wish there were an easy solution such as setting pager ID to the views limit + 1, but if the overal view is 25, and the view in the content displaying in the view is limited to 25, you'd have the same pager ID collision again.

    Why does pager ID need to be numeric anyways? If it could be alphanumeric you could go view-name_dislay-name?

Production build 0.71.5 2024