Deprecated function: Calling static trait method Drupal\webform\Element\WebformEntityTrait::setOptions is deprecated

Created on 1 December 2022, over 1 year ago
Updated 15 June 2023, about 1 year ago

Problem/Motivation

Entity Handler element is not showed for adding in webform build section.

dblog reports shows:

Deprecated function: Calling static trait method Drupal\webform\Element\WebformEntityTrait::setOptions is deprecated, it should only be called on a class using the trait in Drupal\webform\Plugin\WebformElement\WebformEntitySelect->setOptions() (line 395 of /var/www//web/modules/contrib/webform/src/Plugin/WebformElement/WebformEntityReferenceTrait.php)
#0 /var/www//web/core/includes/bootstrap.inc(347): _drupal_error_handler_real()
#1 /var/www//web/modules/contrib/webform/src/Plugin/WebformElement/WebformEntityReferenceTrait.php(395): _drupal_error_handler()
#2 /var/www//web/modules/contrib/webform/src/Plugin/WebformElement/WebformEntityOptionsTrait.php(54): Drupal\webform\Plugin\WebformElement\WebformEntitySelect->setOptions()
#3 /var/www//web/modules/contrib/webform/modules/webform_ui/src/Form/WebformUiElementTypeFormBase.php(299): Drupal\webform\Plugin\WebformElement\WebformEntitySelect->prepare()
#4 /var/www//web/modules/contrib/webform/modules/webform_ui/src/Form/WebformUiElementTypeFormBase.php(237): Drupal\webform_ui\Form\WebformUiElementTypeFormBase->buildElementPreview()
#5 /var/www//web/modules/contrib/webform/modules/webform_ui/src/Form/WebformUiElementTypeSelectForm.php(78): Drupal\webform_ui\Form\WebformUiElementTypeFormBase->buildRow()
#6 [internal function]: Drupal\webform_ui\Form\WebformUiElementTypeSelectForm->buildForm()
#7 /var/www//web/core/lib/Drupal/Core/Form/FormBuilder.php(531): call_user_func_array()
#8 /var/www//web/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm()
#9 /var/www//web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#10 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#11 /var/www//web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#12 /var/www//web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#13 /var/www//web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#14 /var/www//web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#15 /var/www//vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#16 /var/www//vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#17 /var/www//web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#18 /var/www//web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#19 /var/www//web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#20 /var/www//web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#21 /var/www//web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#22 /var/www//web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#23 /var/www//vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#24 /var/www//web/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle()
#25 /var/www//web/index.php(19): Drupal\Core\DrupalKernel->handle()
#26 {main}

Steps to reproduce

Drupal 9.4.8 with PHP 8.1.11
1) Install webform modules 6.1.3 along with webform_entity_handler 2.0.0-beta1
2) Go to /admin/structure/webform/manage/
3) Push on "Build" tab , press "add element" button. No "Entity Handler" is showed

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain qpro Spain

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.

Production build 0.69.0 2024