Problem/Motivation

If I try to create a new node which has a workflow field, the select or radio button list of states is empty.

Steps to reproduce

Configure a workflow field to use either the "Select list" or "Check boxes/radio buttons" form display widget. Create a new node using the type. On the form, there are no workflow states listed and the form does not pass validation. This only happens in the -dev branch, not 2.2.2/2.1.10.

Proposed resolution

The 2.1.x-dev branch removed this code from WorkflowItem::getTransition. It should be replaced so that a default transition is created when the node is unsaved:

    $transition ??= WorkflowTransition::create([
      'entity' => $this->getEntity(),
      'field_name' => $this->getParent()->getName(),
      'wid' => $this->getWorkflowId(),
    ]);

Comments

gribnif created an issue.