Problem/Motivation

if ($pager_offset = $this->view->pager->getOffset()) { on ViewsBulkOperationsActionProcessor.
The pager is not set resulting in the following error:

Error: Call to a member function getOffset() on null in /var/www/html/web/modules/contrib/views_bulk_operations/src/Service/ViewsBulkOperationsActionProcessor.php on line 241

VBO 3.13, Drupal 8.9.15.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

krystalcode created an issue. See original summary.

krystalcode’s picture

Issue summary: View changes

krystalcode’s picture

I have created an MR with a check that the pager is set before calling a method on it. Not sure if that's the correct solution, should the pager always be set and there's something missing elsewhere?

ressinel’s picture

I have the same error. After some investigation, I got that changes by this issue raise the error.

ressinel’s picture

StatusFileSize
new513 bytes

Here's the patch that helps me to fix this error.

ressinel’s picture

Status: Active » Needs review
navneet0693’s picture

Status: Needs review » Reviewed & tested by the community
graber’s picture

Status: Reviewed & tested by the community » Needs work

The merge request needs to be rebased and the patch doesn't apply. Also not sure what's RTBCed - the MR or the patch?

navneet0693’s picture

Version: 8.x-3.x-dev » 4.0.x-dev
ressinel’s picture

I have updated the patch.

ressinel’s picture

StatusFileSize
new551 bytes
navneet0693’s picture

Status: Needs work » Needs review
StatusFileSize
new553 bytes
navneet0693’s picture

@Graber The RTBC was for the patch, somehow the previous was getting applied via the composer.

  • Graber committed 5593793 on 4.0.x authored by Ressinel
    Issue #3217543 by Ressinel, krystalcode, navneet0693: Pager view not...
graber’s picture

Status: Needs review » Fixed

Sorry it took so much time to commit this.

ressinel’s picture

@Graber I see that you have reverted changes of this issue in this commit. We should add them again since views_bulk_operations 4.0.1 release has this issue marked as fixed: https://www.drupal.org/project/views_bulk_operations/releases/4.0.1

Status: Fixed » Closed (fixed)

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

graber’s picture