Call to member function isAllowed() on bool - EntityQueue action plugins

Created on 18 July 2024, 4 months ago
Updated 26 August 2024, 3 months ago

Problem/Motivation

Action plugins were added to this module in ✨ Implement core action plugins to support ECA, others Fixed -- however, the Access() methods have a bug in them.

    $access = $subqueue->access('update');
    return $return_as_object ? $access : $access->isAllowed();

... the first line of that does not pass the $return_as_object parameter to the subqueue access check, and thus always gets a boolean value and not an object. So it causes a whitescreen error:

Error: Call to a member function isAllowed() on bool in Drupal\eca\Entity\Objects\EcaAction->execute() (line 103 of modules/contrib/eca/src/Entity/Objects/EcaAction.php).

... and is going to fail regardless.

Steps to reproduce

Create an ECA 2.x model that uses the AddToQueue/RemoveFromQueue action, and run it with some data.

Proposed resolution

Fix Access function on the new Action plugins.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

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