Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated: Creation of dynamic property :$has_json_form_widget #4153

Closed
swirtSJW opened this issue Mar 29, 2024 · 2 comments
Closed

Deprecated: Creation of dynamic property :$has_json_form_widget #4153

swirtSJW opened this issue Mar 29, 2024 · 2 comments

Comments

@swirtSJW
Copy link
Contributor

swirtSJW commented Mar 29, 2024

This is caused by PHP 8.2 not liking undeclared properties.
https://php.watch/versions/8.2/dynamic-properties-deprecated

Describe the bug

Seeing this error while editing a dataset

Deprecated function: Creation of dynamic property Drupal\Core\Form\FormState::$has_json_form_widget is deprecated in json_form_widget_field_widget_complete_form_alter() (line 79 of modules/contrib/dkan/modules/json_form_widget/json_form_widget.module).
json_form_widget_field_widget_complete_form_alter(Array, Object, Array) (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('field_widget_complete_form', Array, Object, Array) (Line: 147)
Drupal\Core\Field\WidgetBase->form(Object, Array, Object) (Line: 183)
Drupal\Core\Entity\Entity\EntityFormDisplay->buildForm(Object, Array, Object) (Line: 121)
Drupal\Core\Entity\ContentEntityForm->form(Array, Object) (Line: 127)
Drupal\node\NodeForm->form(Array, Object) (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('node_data_edit_form', Object) (Line: 283)
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: 592)
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: 52)
Drupal\pqdc\Middleware\Redirect->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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 53)
Asm89\Stack\Cors->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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps To Reproduce

  • set your environment to display notices
  • Edit a dataset.
  • See the error.

Expected behavior

  • no errors are present when editing a dataset.
@paul-m
Copy link
Contributor

paul-m commented Mar 29, 2024

Fixed in #4129

That's in 2.18.1 released today: https://github.com/GetDKAN/dkan/releases/tag/2.18.1

@paul-m paul-m closed this as completed Mar 29, 2024
@swirtSJW
Copy link
Contributor Author

Oh I see it here #4129. Sorry for the noise. Thanks for the fix @paul-m and for connecting the dots for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants