Views pager ID not unique when embedding a View in another View

Created on 5 May 2019, over 5 years ago
Updated 3 September 2024, 4 months ago

Create a view (Parent View ) displaying fields, add a Global: View field. Select a view that uses pager (Child View). When displaying the Parent View, the Child View pagers are not unique. Using the pager in one of the Child Views forces each Child View to page. This does not make sense to the user who expects the pager to only affect the Child View with which they are currently interacting.

It is extra confusing when one or more Child View does not have enough rows to trigger the pager, instead, when you advance the pager, an empty view is displayed.

This affects displays with and without Use Ajax selected.

The pager in Views has a setting allowing you to change the pager id, however, it does not help when the same view display appears multiple times on one screen.

A possible solution would be to allow the Global View field on the Parent View to pass in some row information to make each pager unique. I imagine this problem would also affect any exposed filters on the Child View, using an exposed filter on any Child View would affect all Child Views in the Parent View display. The same technique could be leveraged for both features.

Maybe something like a checkbox in the Global View field configuration, "Force Exposed Filters and Pager IDs to be unique for each row"? Then we could pass some row information into the Child View and alter the IDs for pagers and exposed filters. Maybe it could be in the form of a token from the current row? I think this should be an optional setting, as I could imagine cases where one might want one pager or exposed filters to control all Child Views.

πŸ› Bug report
Status

Closed: works as designed

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated 20 minutes ago

Created by

πŸ‡ΊπŸ‡ΈUnited States scottsawyer Atlanta

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.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    "Global: View field" doesn't seem to be something provided by core.

    Can you provide steps to reproduce from a fresh installation on 11.x?

    Thanks!

  • Status changed to Closed: works as designed 4 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    It has been over a year since we asked for more information here and none has been provided and the last comment even questioned if this is a core issue.

    Therefore, closing. 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").

    Thanks!

Production build 0.71.5 2024