Problem/Motivation

I've four states and three transitions. Getting four errors like below with missing array key.

Warning: Undefined array key "" in webform_workflows_element_element_form_after_build() (line 262 of modules\contrib\webform_workflows_element\webform_workflows_element.module).

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

crutch created an issue. See original summary.

Ranjit1032002 made their first commit to this issue’s fork.

ranjit1032002’s picture

Status: Active » Needs review

Created MR!10 for the issue mentioned, please review.
Thank you.

crutch’s picture

Thanks Ranjit. Still getting warning with patch.

Warning: Undefined array key "" in webform_workflows_element_element_form_after_build() (line 262 of modules\contrib\webform_workflows_element\webform_workflows_element.module).

webform_workflows_element_element_form_after_build(Array, Object)
call_user_func_array('webform_workflows_element_element_form_after_build', Array) (Line: 1083)
Drupal\Core\Form\FormBuilder->doBuildForm('webform_submission_event_request_add_form', Array, Object) (Line: 579)
Drupal\Core\Form\FormBuilder->processForm('webform_submission_event_request_add_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'add') (Line: 1250)
Drupal\webform\Entity\Webform->getSubmissionForm() (Line: 77)
Drupal\webform\Controller\WebformEntityController->addForm(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
...

maxwellkeeble’s picture

Hi. I've not used this patch as $options could be non-empty but still not have [''] as a key, so the issue would continue. I've committed a change to dev to resolve this, could this please be checked in your environments? (I can't recreate this issue myself sadly).

crutch’s picture

Thank you, sorry for delayed response. Using current dev and getting the same result but it's reporting line 263 now

Warning: Undefined array key "" in webform_workflows_element_element_form_after_build() (line 263 of modules\contrib\webform_workflows_element\webform_workflows_element.module).

webform_workflows_element_element_form_after_build(Array, Object)
call_user_func_array('webform_workflows_element_element_form_after_build', Array) (Line: 1083)
Drupal\Core\Form\FormBuilder->doBuildForm('webform_submission_event_request_node_7926_add_form', Array, Object) (Line: 579)
Drupal\Core\Form\FormBuilder->processForm('webform_submission_event_request_node_7926_add_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'add') (Line: 1257)
Drupal\webform\Entity\Webform->getSubmissionForm(Array) (Line: 112)
Drupal\webform\Element\Webform::preRenderWebformElement(Array)
call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 788)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 374)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array) (Line: 479)
botanic_spark’s picture

Hi, I am also getting the warning, even with latest dev version.

botanic_spark’s picture

StatusFileSize
new607 bytes

I think the issue is solved with update to the operator.

keshavv’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed that there are no further warnings. We can merge #10 patch.

  • maxwellkeeble committed bfa303c9 on 1.0.x
    Issue #3358207 by Ranjit1032002, botanic_spark: Warning: Undefined array...
maxwellkeeble’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.