Error : Call to a member function getWebform() on null in webform_workflows_element_maestro_execute_title()

Created on 12 February 2024, 5 months ago
Updated 5 June 2024, 23 days ago

Problem/Motivation

Maestro interactive task execution fails when the webform_workflows_element_maestro module is activated.

Steps to reproduce

Just try to execute a Maestro task from a process not linked to a webform submission.

Proposed resolution

Check if the submission object is valid in the original code below:

function webform_workflows_element_maestro_execute_title() {
  $queueId = Drupal::routeMatch()->getParameter('queueid');
  $submission = MaestroTransitionWebformWorkflowTask::getSubmission($queueId);

  return t('Review submission: @webformTitle', [
    '@webformTitle' => $submission->getWebform()->label(),
  ]);
}

We should return the default maestro.execute route title if no submission is found.

BTW it looks like the queueid parameter has been replaced by a queueid_or_token parameter, fixed in the MR.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France mably

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024