apigee-edge-drupal icon indicating copy to clipboard operation
apigee-edge-drupal copied to clipboard

Error Deprecated function: Creation of dynamic property Drupal\apigee_edge\Entity\Developer::$original is deprecated

Open maxasus123 opened this issue 1 year ago • 8 comments

Description

This error on Drupal 10.2.5 PHP.8.3

Deprecated function: Creation of dynamic property Drupal\apigee_edge\Entity\Developer::$original is deprecated in Drupal\Core\Entity\EntityStorageBase->doPreSave() (line 524 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to 'Rest Password'
  2. Click on 'login onetime for rest password '
  3. after update new password click 'Go profile.'

Screenshots

Uploading Screenshot 2567-05-13 at 10.08.35.png…

Version Info

Drupal 10.2.5
PHP.8.3 Apigee Edge version '3.0.6'

maxasus123 avatar May 13 '24 03:05 maxasus123

Hi @maxasus123 Thanks for informing us this issue, can you please upload the screenshot of issue, also it will be helpful if you can share the error log for it.

kedarkhaire avatar May 13 '24 10:05 kedarkhaire

Hi @maxasus123 Thanks for informing us this issue, can you please upload the screenshot of issue, also it will be helpful if you can share the error log for it. Hi @kedarkhaire Screenshot 2567-05-13 at 10 08 35

Deprecated function: Creation of dynamic property Drupal\apigee_edge\Entity\Developer::$original is deprecated in Drupal\Core\Entity\EntityStorageBase->doPreSave() (line 524 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php) #0 /var/www/html/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real() #1 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(524): _drupal_error_handler() #2 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(483): Drupal\Core\Entity\EntityStorageBase->doPreSave() #3 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityBase.php(354): Drupal\Core\Entity\EntityStorageBase->save() #4 /var/www/html/web/modules/contrib/apigee_edge/apigee_edge.module(1344): Drupal\Core\Entity\EntityBase->save() #5 [internal function]: apigee_edge_user_presave() #6 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(409): call_user_func_array() #7 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(388): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() #8 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(408): Drupal\Core\Extension\ModuleHandler->invokeAllWith() #9 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(215): Drupal\Core\Extension\ModuleHandler->invokeAll() #10 /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(900): Drupal\Core\Entity\EntityStorageBase->invokeHook() #11 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(529): Drupal\Core\Entity\ContentEntityStorageBase->invokeHook() #12 /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(753): Drupal\Core\Entity\EntityStorageBase->doPreSave() #13 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(483): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave() #14 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(806): Drupal\Core\Entity\EntityStorageBase->save() #15 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityBase.php(354): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() #16 /var/www/html/web/core/modules/user/src/ProfileForm.php(46): Drupal\Core\Entity\EntityBase->save() #17 [internal function]: Drupal\user\ProfileForm->save() #18 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(129): call_user_func_array() #19 /var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php(67): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() #20 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm() #21 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm() #22 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm() #23 [internal function]: Drupal\Core\Controller\FormController->getContentResult() #24 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array() #25 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #26 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext() #27 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() #28 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #29 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw() #30 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle() #31 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle() #32 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle() #33 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle() #34 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle() #35 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass() #36 /var/www/html/web/modules/contrib/access_filter/src/AccessFilterMiddleware.php(68): Drupal\page_cache\StackMiddleware\PageCache->handle() #37 /var/www/html/web/modules/contrib/shield/src/ShieldMiddleware.php(270): Drupal\access_filter\AccessFilterMiddleware->handle() #38 /var/www/html/web/modules/contrib/shield/src/ShieldMiddleware.php(226): Drupal\shield\ShieldMiddleware->bypass() #39 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\shield\ShieldMiddleware->handle() #40 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() #41 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() #42 /var/www/html/web/modules/contrib/remove_http_headers/src/StackMiddleware/RemoveHttpHeadersMiddleware.php(49): Drupal\Core\StackMiddleware\AjaxPageState->handle() #43 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() #44 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle() #45 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle() #46 {main}

maxasus123 avatar May 13 '24 10:05 maxasus123

Thanks @maxasus123 for sharing the screenshot and the error. We will look into it further. Meanwhile, if you have any fix for it, feel free to share by creating a PR for it.

Thanks!

kedarkhaire avatar May 13 '24 11:05 kedarkhaire

Hi,

I am facing the same exception. Does any solution exist for the problem?

Apigee module V3.0 PHP 8.2

Thanks

MahmoudSayed96 avatar Jul 13 '24 12:07 MahmoudSayed96

Hi,

I am facing the same exception. Does any solution exist for the problem?

Apigee module V3.0 PHP 8.2

Thanks

Hi @MahmoudSayed96

Add code #[\AllowDynamicProperties] before at file src/Entity/Developer.php class Developer extends EdgeEntityBase implements DeveloperInterface { After

#[\AllowDynamicProperties] 
 class Developer extends EdgeEntityBase implements DeveloperInterface {

maxasus123 avatar Jul 13 '24 12:07 maxasus123

HI @maxasus123 Good that you shared a solution, it will be more helpful if you can create a PR for it. Thanks!

kedarkhaire avatar Jul 15 '24 06:07 kedarkhaire

Hi @maxasus123 Thanks, the exception does not appear after applying your solution.

MahmoudSayed96 avatar Jul 15 '24 17:07 MahmoudSayed96

Hi @maxasus123 Can you please create a PR for this ? Thanks!

kedarkhaire avatar Aug 01 '24 07:08 kedarkhaire

Hi @maxasus123 Can you please create a PR for this ? Thanks!

Hi @kedarkhaire PR for this issues. https://github.com/apigee/apigee-edge-drupal/pull/1071

maxasus123 avatar Aug 13 '24 06:08 maxasus123