_node_mass_update_batch_process fails during user cancel when revision is deleted

Created on 23 June 2024, about 1 year ago

Problem/Motivation

In _node_mass_update_batch_process() we call _node_mass_update_helper() with the loaded node object or revision. If the node or revision is somehow deleted during the cancel process, the batch process fails with the error:
_node_mass_update_helper(): Argument #1 ($node) must be of type Drupal\node\NodeInterface, null given

Steps to reproduce

  1. Create a bunch of nodes for a user
  2. Cancel the user using user_cancel_reassign
  3. Delete one of the nodes of the user while the cancel process is running
  4. An error should be shown: _node_mass_update_helper(): Argument #1 ($node) must be of type Drupal\node\NodeInterface, null given

Proposed resolution

Check if the node or revision still exists before calling _node_mass_update_helper()

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component
Node system 

Last updated about 19 hours ago

No maintainer
Created by

🇳🇱Netherlands seanB Netherlands

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024