Deprecated function: Creation of dynamic property

Created on 16 April 2024, 5 months ago
Updated 10 June 2024, 4 months ago

Problem/Motivation

I have a paragraph type for block referencing. With this paragraph type I want to show the preview in the node edit form instead of the whole block content. I don't know if the setting I want to make is the right one, but it gives an error.

Deprecated function: Creation of dynamic property Drupal\block_field\Plugin\Field\FieldFormatter\BlockFieldLabelFormatter::$currentUser is deprecated in Drupal\block_field\Plugin\Field\FieldFormatter\BlockFieldLabelFormatter->__construct() (line 45 of modules/contrib/block_field/src/Plugin/Field/FieldFormatter/BlockFieldLabelFormatter.php).

Drupal\block_field\Plugin\Field\FieldFormatter\BlockFieldLabelFormatter->__construct('block_field_label', Array, Object, Array, 'hidden', 'preview', Array, Object) (Line: 52)
Drupal\block_field\Plugin\Field\FieldFormatter\BlockFieldLabelFormatter::create(Object, Array, 'block_field_label', Array) (Line: 64)
Drupal\Core\Field\FormatterPluginManager->createInstance('block_field_label', Array) (Line: 81)
Drupal\Core\Plugin\DefaultLazyPluginCollection->initializePlugin('block_field_label') (Line: 80)
Drupal\Component\Plugin\LazyPluginCollection->get('block_field_label') (Line: 149)
Drupal\Component\Plugin\LazyPluginCollection->getIterator() (Line: 114)
Drupal\Core\Plugin\DefaultLazyPluginCollection->getConfiguration() (Line: 295)
Drupal\Core\Config\Entity\ConfigEntityBase->preSave(Object) (Line: 270)
Drupal\Core\Entity\EntityDisplayBase->preSave(Object) (Line: 528)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 483)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 257)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 354)
Drupal\Core\Entity\EntityBase->save() (Line: 609)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 293)
Drupal\Core\Entity\EntityForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('entity_view_display_edit_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
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: 28)
Drupal\Core\StackMiddleware\ContentLength->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: 270)
Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 226)
Drupal\shield\ShieldMiddleware->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: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

1. Add paragraph type
2. Add block reference field to paragraph type
3. go to: /admin/structure/paragraphs_type/{type}/display/preview
4. Change format to block description

Drupal Core 10.2.4

๐Ÿ› Bug report
Status

Closed: duplicate

Component

Code

Created by

๐Ÿ‡จ๐Ÿ‡ญSwitzerland handkerchief

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024