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)