TypeError: Cannot access offset of type string on string in Drupal\Core\Field\WidgetBase->extractFormValues()

Created on 5 May 2023, over 1 year ago
Updated 12 June 2023, about 1 year ago

Problem/Motivation

After upgrading from 9.4.11 to 9.5.9 and upgrading php core to 8.1.17 on production server, the user.module upgrades seem to continue to be a problem I can not find any new resolution to this bug error.
Database: 5.7.41-cll-lve
Php 8.1.17
Drupal 9.5.8 && 9.5.9 versions

TypeError: Cannot access offset of type string on string in Drupal Drupal\Core\Field\WidgetBase->extractFormValues() (line 391 of /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Field/WidgetBase.php)

Steps to reproduce

Steps to reproduce.

User tries to create an account. On submission, gets the wsod. User is not created.

The below error is in reports.

TypeError: Cannot access offset of type string on string in Drupal\Core\Field\WidgetBase->extractFormValues() (line 391 of /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Field/WidgetBase.php)
#0 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php(237): Drupal\Core\Field\WidgetBase->extractFormValues()
#1 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Entity/ContentEntityForm.php(334): Drupal\Core\Entity\Entity\EntityFormDisplay->extractFormValues()
#2 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Entity/EntityForm.php(293): Drupal\Core\Entity\ContentEntityForm->copyFormValuesToEntity()
#3 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Entity/ContentEntityForm.php(155): Drupal\Core\Entity\EntityForm->buildEntity()
#4 /home/jk7exiton6ol/public_html/core/modules/user/src/AccountForm.php(368): Drupal\Core\Entity\ContentEntityForm->buildEntity()
#5 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Entity/EntityForm.php(278): Drupal\user\AccountForm->buildEntity()
#6 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Entity/ContentEntityForm.php(145): Drupal\Core\Entity\EntityForm->submitForm()
#7 /home/jk7exiton6ol/public_html/core/modules/user/src/AccountForm.php(432): Drupal\Core\Entity\ContentEntityForm->submitForm()
#8 /home/jk7exiton6ol/public_html/core/modules/user/src/RegisterForm.php(86): Drupal\user\AccountForm->submitForm()
#9 [internal function]: Drupal\user\RegisterForm->submitForm()
#10 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Form/FormSubmitter.php(114): call_user_func_array()
#11 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Form/FormSubmitter.php(52): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers()
#12 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm()
#13 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm()
#14 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#15 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#16 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#17 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#19 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#20 /home/jk7exiton6ol/public_html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#21 /home/jk7exiton6ol/public_html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#22 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#23 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#24 /home/jk7exiton6ol/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#25 /home/jk7exiton6ol/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#26 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#27 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#28 /home/jk7exiton6ol/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#29 /home/jk7exiton6ol/public_html/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#30 /home/jk7exiton6ol/public_html/index.php(19): Drupal\Core\DrupalKernel->handle()
#31 {main}

I have tried available widgetbase patches and the issue prevails.

If I switch back to php 7.4 there is no issues with creating an account.

Can someone help me?

πŸ› Bug report
Status

Closed: works as designed

Version

9.5

Component
User moduleΒ  β†’

Last updated 1 day ago

Created by

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

Comments & Activities

Production build 0.71.5 2024