Undefined array key "label"

Created on 22 September 2021, about 3 years ago
Updated 24 February 2024, 9 months ago

Problem/Motivation

After add some double field for taxonomy term fields I have next error on the edit term form:

Warning: Undefined array key "label" in Drupal\double_field\Plugin\Field\FieldType\DoubleField->fieldSettingsForm() (line 184 of modules/contrib/double_field/src/Plugin/Field/FieldType/DoubleField.php).

Drupal\double_field\Plugin\Field\FieldType\DoubleField->fieldSettingsForm(Array, Object) (Line: 117)
Drupal\field_ui\Form\FieldConfigEditForm->form(Array, Object) (Line: 106)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 532)
Drupal\Core\Form\FormBuilder->retrieveForm('field_config_edit_form', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object) (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 578)
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: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 717)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

πŸ‡΅πŸ‡±Poland azovsky

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Re-saving the field settings didn't work for me.
    It seems that some settings are reset since migrating to version 4.
    My problem was that the label display dropdown in the widget had no value selected.
    This is now fixed by selecting a value in label display.

  • πŸ‡ΊπŸ‡ΈUnited States jcontreras

    I was having the same issue~ I have a large number of paragraphs field using this so I just create a patch that checks for the "label" index, if not set, else set to "hidden". seems to work fine for my case.. if anyone needs it.

  • πŸ‡°πŸ‡¬Kyrgyzstan sahaj

    @jcontreras Thanks, your patch seems to have fixed my similar issue.

Production build 0.71.5 2024