Problem/Motivation

Pager is shown twice in admin/people if views module is disabled. This is caused by UserListBuilder::render() which adds a pager although the pager is already added by the parentEntityListBuilder::render()

Steps to reproduce on a clean installation:
- create 50+ users (devel generate speed up the things)
- disable views, views_ui
- go to admin/people
- pager is shown twice

Remaining tasks

create patch.

User interface changes

none

API changes

none

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

willzyx’s picture

willzyx’s picture

Issue tags: +Quickfix
dawehner’s picture

+++ b/core/modules/user/src/UserListBuilder.php
@@ -176,7 +176,6 @@ public function getOperations(EntityInterface $entity) {
     $build['accounts'] = parent::render();
     $build['accounts']['#empty'] = $this->t('No people available.');

Isn't the actual problem that we do $build['accounts'] = parent::render() and not $build = parent::render(); $build['table']['#empty'];? I bet the #empty text doesn't' work as expected, maybe we should fix it.

willzyx’s picture

@dawehner you are completely right

willzyx’s picture

The last submitted patch, 4: d8-users-duplicated-pager-2478091-4.patch, failed testing.

jibran’s picture

Is it worth adding tests?

willzyx’s picture

I think add a test for this is unnecessary and does not add any value, but let me know

jibran’s picture

Status: Needs review » Reviewed & tested by the community

Fair enough

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Agreed that a test for this feels unnecessary.

This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed d361bd6 and pushed to 8.0.x. Thanks!

  • alexpott committed d361bd6 on 8.0.x
    Issue #2478091 by willzyx: Pager is shown twice in admin/people if views...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.