- Status changed to Active
12 months ago 3:39pm 1 March 2024 - 🇳🇱Netherlands johnv
in #2899025-57: Attached field type 'file' not working on WorkflowTransition → , I removed the unique ID.
Please test dev version.I guess this solves your problem, If not please reopen.
- Status changed to Fixed
11 months ago 1:47pm 9 April 2024 - 🇳🇱Netherlands johnv
We now have 3 possible options:
Option 1: call transitionElement() directly.$element['#default_value'] = $transition; $element = WorkflowTransitionElement::transitionElement($element, $form_state, $form);
Option 2: call WorkflowTransitionForm() directly.
// @todo Use Form/Widget, instead of transitionElement(). $element = WorkflowTransitionForm::createInstance($entity, $field_name, [], $transition); $element = WorkflowTransitionForm::trimWorkflowTransitionForm($element, $transition); $element['#parents'] = []; // Remove langcode to avoid error upon submit. // InvalidArgumentException: The configuration property langcode.0 doesn't exist. unset($element['langcode']);
Option 3: call WorkflowDefaultWidget via NodeFormDisplay.
$element = WorkflowDefaultWidget::createInstance($transition); // Fetch the element from the widget. $element = $element[$field_name]['widget'][0];
Automatically closed - issue fixed for 2 weeks with no activity.