'Selected 0 items in this view' displayed instead of the total item count

Created on 31 May 2022, over 2 years ago
Updated 30 August 2024, 3 months ago

Problem/Motivation

'Selected 0 items in this view' displayed instead of the total item count when selecting all items in a view.

Steps to reproduce

Create a view with a full pager displaying 50 items. Make sure there are more than 50 items in the view and select all items. The summary will display 'Selected 0 items in this view' instead of the total item count.

Proposed resolution

In some scenarios the ViewExecutables in ViewsBulkOperationsBulkForm and ViewsBulkOperationsViewData are not in sync. While the $this->view in ViewsBulkOperationsBulkForm has a pager attached, $this->view in ViewsBulkOperationsViewData does not. When getTotalResults() is called inside ViewsBulkOperationsBulkForm::updateTempstoreData, the result returned is null because $this->view inside ViewsBulkOperationsViewData does not have a pager attached and therefore fails to get the total row count. Passing the most up-to-date view variable through getTotalResults() solves this issue.

πŸ› Bug report
Status

Needs review

Version

4.2

Component

Core

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.

Production build 0.71.5 2024