Tokens/Field rewrite in views breaks editable field

Created on 19 March 2023, over 1 year ago

When setting up a simple contact message view, editablefields works fine. However, I'm losing all of my field formatting in the following conditions:

Contact Message EntityReference field
Formatter: Editable Field
Select Behavior: Inline form

Example 1:

Field 1: Editable field
Field 2: Global Text (with or without content)

Select field widget is lost. Editable field displays option in plain text in one continuous line, is not editable.

Example 2:

Field 1: Editable field
Field 2: Simple text field
[rewrite field 2 with replacement token from Field 1]

Field 1 displays fine. Field 2 broken as per example 1.

Also, possibly related, if I switch to popup mode, the field displays correctly, but I get the following error, which leads me to believe this is all part of a related fallback formatting issue:

Warning: Undefined array key "fallback_edit" in Drupal\editablefields\Form\EditableFieldsForm->buildForm() (line 105 of modules/contrib/editablefields/src/Form/EditableFieldsForm.php).

Drupal\editablefields\Form\EditableFieldsForm->buildForm(Array, Object)call_user_func_array(Array, Array) (Line: 534)
Drupal\Core\Form\FormBuilder->retrieveForm('editablefields_form_contact_message_mycontactform_99999_field_myeditablefield_default', Object) (Line: 281)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 222)
Drupal\Core\Form\FormBuilder->getForm(Object) (Line: 162)
Drupal\editablefields\services\EditableFieldsHelper->getForm(Object, 'field_myeditablefield', Array) (Line: 78)
Drupal\editablefields\Controller\EditablefieldsController->getForm('contact_message', '99999', 'default', 'field_myeditablefield, 'token')call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024