- Issue created by @joseph.olstad
- 🇨🇦Canada joseph.olstad
Should fix it. newState should never be null right? after all, this is scheduled transitions, not scheduled binary state.
- Status changed to Needs review
over 1 year ago 11:15pm 27 September 2023 - last update
over 1 year ago 52 pass, 2 fail - last update
over 1 year ago 53 pass - last update
over 1 year ago PHPLint Failed - last update
over 1 year ago 52 pass, 2 fail The last submitted patch, 4: 3390291-04.patch, failed testing. View results →
- last update
over 1 year ago 62 pass - 🇨🇦Canada joseph.olstad
ok patch 4 is for 2.3.x - it's good, passes D9.5 tests as expected.
patch 8 is for 2.4.x - Running tests
- 🇨🇦Canada joseph.olstad
This fix might not be the optimal solution but for now it's all I've got.
root cause could be something a bit strange situation like a workflow that was removed. - 🇦🇺Australia dpi Perth, Australia
Upgrade from 2.2.x to 2.3.0, run cron then check your logs
This doesnt seem right. Perhaps a workflow was modified, deleting a state.
By the look an invalid $newState = NULL seems to have been possible since the inception of the project (2018).
--
Please use MRs, not patches.
Lets use === NULL.
Tests should be straightforward: Provide a non-existent state machine name with all the normal set up (inspiration from existing tests)
- Status changed to Needs work
over 1 year ago 4:19am 28 September 2023 - 🇮🇳India mohd sahzad
I have updated for this issue: Call to a member function id() on null in ScheduledTransitionsRunner->transitionEntity()
- 🇦🇺Australia dpi Perth, Australia
14 doesnt answer or address the points from 12.
- 🇨🇦Canada joseph.olstad
The automated tests depend on the core function "createEditorialWorkflow()"
To test this one would have to create a new workflow called bogus_workflow();
Example:
$workflow = Workflow::create([ 'id' => 'bogus_workflow', 'label' => 'REST Workflow', 'type' => 'workflow_type_complex_test', ]); $workflow ->getTypePlugin() ->addState('draft', 'Draft') ->addState('published', 'Published'); $configuration = $workflow->getTypePlugin()->getConfiguration(); $configuration['example_setting'] = 'foo'; $configuration['states']['draft']['extra'] = 'bar'; $workflow->getTypePlugin()->setConfiguration($configuration); $workflow->save();
then with a newly created content , assign a transition from the bogus_workflow
Then delete the bogus_workflow
$workflow->delete();
Then run cron
BOOM!
This will prove that the above patch works.