Needs work
Project:
Business Rules
Version:
8.x-1.0-beta8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
19 Dec 2019 at 10:09 UTC
Updated:
25 Jun 2022 at 19:16 UTC
Jump to comment: Most recent
Hi guys,
I'm trying to schedule task in Business rules.
This is my scenario:
In my user profile there is a date field(contract expiration) and i want to set user to NOT ACTIVE after this date.
This is what i did:
So, when admin insert a new user, a new schedule task is added in Schedule Tab. And its ok.
But, if I try to run the task give me this error: "Error: Call to a member function getSubject() on boolean in Drupal\business_rules\Controller\ScheduleController->execute() (line 136 of modules/contrib/business_rules/src/Controller/ScheduleController.php)."
Am I wrong in something?
Comments
Comment #2
kris77 commentedI solved erro this way:
Change raw in 136 with this:
$entity = $task_event ? $task_event->getSubject() instanceof Entity ? $task_event->getSubject() : FALSE : FALSE;Comment #3
nwom commentedI haven't ran into this issue myself, but noticed that the problem can supposedly be solved with the code in the previous comment, so somone would just need to create a patch. Setting to "Needs Work" in that case.