Access to node form with a workflow field crash

Created on 21 February 2025, about 1 month ago

The last dev workflow module update (3caa0ec4e3) crash the node form displaying containing a workflow field with this error :
TypeError : Drupal\workflow\Element\WorkflowTransitionElement::updateWidget(): Argument #1 ($haystack) must be of type array, null given, called in web/modules/contrib/workflow/src/Element/WorkflowTransitionElement.php on line 256 in Drupal\workflow\Element\WorkflowTransitionElement::updateWidget() (line 326 of web/modules/contrib/workflow/src/Element/WorkflowTransitionElement.php).

Thanks to correct this issue please.
Regards

🐛 Bug report
Status

Active

Version

1.0

Component

Workflow Field API

Created by

🇫🇷France dcoppel

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

Comments & Activities

  • Issue created by @dcoppel
  • 🇳🇱Netherlands johnv

    Hmm,
    can you share the settings on the page /admin/config/workflow/workflow/TYPE/form-display.?
    And what settings for 'fieldset' and 'How to show the states' doyou have on page /admin/config/workflow/workflow/TYPE

  • 🇫🇷France dcoppel

    My settings on the page /admin/config/workflow/workflow/TYPE/form-display is that all fields (language, to state, timestamp, commentary) are disabled.
    My setting for 'fieldset' is : No fieldset
    My setting for 'How to show the states' is : Action buttons

    Thanks for your help !

  • 🇳🇱Netherlands johnv

    OK, I see.
    It was not tested to disable the subfields/properties of a Workflow type.
    You should do that on the Workfllow itself: /drupal/admin/config/workflow/workflow/TYPE
    It is foreseen that we support that page completely, in the future.

    Is there as reason you did do that?
    I updated the summary.

    • johnv committed 0d2a72ed on 8.x-1.x
      Issue #3508210 by dcoppel: TypeError when disabling Workflow subfield in...
  • 🇳🇱Netherlands johnv

    Also, please test latest dev version.

  • 🇫🇷France dcoppel

    With the latest dev version (9197af8754) this issue disapear ! Thanks a lot !

    I still have an open issue with the same configuration, if you can see too ? The number is 3458984.
    I will made a new post to make it up.
    Thanks !

  • 🇫🇷France dcoppel

    This is strange as in my drupal dashboard there is those information now :

    The definition of entities and/or fields does not correspond
    The following changes were detected in the entity type and field definitions.
    Workflow scheduled transition

    The field Since the state needs to be updated.
    The Toward State field needs to be updated.

    Workflow transition

    The field Since the state needs to be updated.
    The Toward State field needs to be updated.

    There is no database updates waiting. Any Suggestions ?

  • 🇳🇱Netherlands johnv

    This "needs to be updated." exists for many installations.
    It is not possible to fix that. Since, you cannot update the schema(). No need to worry.

    I will check the other one.

  • 🇳🇱Netherlands johnv

    Regarding #8, I created issue 🐛 Mismatched entity and/or field definitions on Status report Active to log and correct that.

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

Production build 0.71.5 2024