(Adding a new Computed field) Creation of dynamic property configureEntityViewDisplay

Created on 19 April 2023, over 1 year ago
Updated 12 July 2023, over 1 year ago

Problem

With the logging of errors enabled

Upon adding a new computed field for with the default set of enabled fields,

the widget offers to me to choose as a source just:
- - Computed value source: Reverse entity reference
- - - - Entity reference field: Entity ID on Comment entities
but nothing else.

Fine!

https://www.drupal.org/project/computed_field/issues/3354764#comment-150... πŸ’¬ Nothing is showed after adding computed field Fixed

When a new field of the computed field is being added, the message emerges:

Deprecated function: Creation of dynamic property Drupal\computed_field\Form\ComputedFieldForm::$pluginManager is deprecated in Drupal\computed_field\Form\ComputedFieldForm->configureEntityViewDisplay() (line 300 of modules/contrib/computed_field/src/Form/ComputedFieldForm.php).

Drupal\computed_field\Form\ComputedFieldForm->configureEntityViewDisplay('computed_my_computed_field') (Line: 250)
Drupal\computed_field\Form\ComputedFieldForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Deprecated function: Creation of dynamic property Drupal\computed_field\Form\ComputedFieldForm::$entityDisplayRepository is deprecated in Drupal\computed_field\Form\ComputedFieldForm->configureEntityViewDisplay() (line 301 of modules/contrib/computed_field/src/Form/ComputedFieldForm.php).

Drupal\computed_field\Form\ComputedFieldForm->configureEntityViewDisplay('computed_my_computed_field') (Line: 250)
Drupal\computed_field\Form\ComputedFieldForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)

In this case, we have nothing but the generated list of labels of comments.

Later on, if we try to edit a such article and press SAVE or PREVIEW, the result is:

Shazaaaam!

TypeError: Unsupported operand types: string + array in Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager->getSelectionHandler() (line 99 of core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php).

Drupal\Core\Entity\Plugin\Validation\Constraint\ValidReferenceConstraintValidator->validate() (Line: 202)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints() (Line: 154)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 106)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate() (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate() (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 489)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 188)
Drupal\Core\Entity\ContentEntityForm->validateForm()
call_user_func_array() (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers() (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118)
Drupal\Core\Form\FormValidator->validateForm() (Line: 591)
Drupal\Core\Form\FormBuilder->processForm() (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 686)
Drupal\Core\DrupalKernel->handle() (Line: 19)

πŸ› Bug report
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

πŸ‡·πŸ‡ΊRussia allexim

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

Comments & Activities

  • Issue created by @allexim
  • πŸ‡ΊπŸ‡ΈUnited States joshf

    I experienced this error as well. I wasn't able to fix it, but I was able to identify that a ComputedField object is making it into EntityFieldManager::fieldDefinitions when it should actually be a ComputedFieldDefinition object.

  • Status changed to Closed: won't fix over 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom joachim

    Please could you make issues about one problem only. I don't know what this issue is about -- the title is for a minor warning but by the end you seem to be reporting a crash!

  • πŸ‡¬πŸ‡§United Kingdom joachim

    > TypeError: Unsupported operand types: string + array in Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager->getSelectionHandler() (line 99 of core/lib/Drupal/Core/Entity/EntityReferenceSelection/SelectionPluginManager.php).

    I suspect that was fixed in πŸ› use $field_type_manager->getDefaultFieldSettings() in ComputedFieldBase::getFieldDefinitionSetting() Fixed .

    > but nothing else.

    That's because RER is the only computed field plugin available OOTB.

Production build 0.71.5 2024