Pagination when there's more than one view that have a pager.

Created on 19 May 2019, about 6 years ago
Updated 16 October 2023, almost 2 years ago

I created a view that has a views field view, the loaded view via views field view has a pager.
When having multiple views that have a pager we need to assign a unique Pager ID to make it work.

Pager doesn't work correctly on a page consisting of two blocks of which only one with ajax - https://www.drupal.org/project/drupal/issues/2878520 β†’

I tried to below code but with no luck

function MYMODULE_views_pre_view( \Drupal\views\ViewExecutable $view, $display_id, array &$args) {
  if ($display_id == 'archive_slave') {
    $view->pager->options['id'] = get_pager_id(); //get_pager_id() returns a unique number.
  }
}
πŸ› Bug report
Status

Active

Version

1.0

Component

Miscellaneous

Created by

πŸ‡―πŸ‡΄Jordan ammar qala

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.

  • πŸ‡§πŸ‡ͺBelgium Jonasanne

    Has there been an update on this issue?
    I still have this problem in D10.1.4.

  • πŸ‡ΊπŸ‡ΈUnited States j_s

    Still an issue with D10.4.7. Pagination is just not there when embedded views also have pagination enabled. The solution for me was to disable pagination in the embedded views. That let the main view's pagination work again.

Production build 0.71.5 2024