Newly created donation form crashes on verify

Created on 4 June 2024, 24 days ago
Updated 17 June 2024, 11 days ago

Problem/Motivation

We've just added Give to a Drupal 9 site, and are trying to add a donation form. When we try to use the form, we get an error on the form validation. From the logs, the error shows as

Error: Cannot unset string offsets in Drupal\Core\Field\WidgetBase->extractFormValues() (line 386 of /home/accdesign/public_html/web/core/lib/Drupal/Core/Field/WidgetBase.php)
#0 /home/accdesign/public_html/web/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php(237): Drupal\Core\Field\WidgetBase->extractFormValues()
#1 /home/accdesign/public_html/web/core/lib/Drupal/Core/Entity/ContentEntityForm.php(334): Drupal\Core\Entity\Entity\EntityFormDisplay->extractFormValues()
#2 /home/accdesign/public_html/web/core/lib/Drupal/Core/Entity/EntityForm.php(293): Drupal\Core\Entity\ContentEntityForm->copyFormValuesToEntity()
#3 /home/accdesign/public_html/web/core/lib/Drupal/Core/Entity/ContentEntityForm.php(155): Drupal\Core\Entity\EntityForm->buildEntity()
#4 /home/accdesign/public_html/web/modules/contrib/give/src/Form/Donation/DonationForm.php(180): Drupal\Core\Entity\ContentEntityForm->buildEntity()
#5 /home/accdesign/public_html/web/core/lib/Drupal/Core/Entity/ContentEntityForm.php(186): Drupal\give\Form\Donation\DonationForm->buildEntity()
#6 /home/accdesign/public_html/web/modules/contrib/give/src/Form/Donation/DonationForm.php(203): Drupal\Core\Entity\ContentEntityForm->validateForm()
#7 [internal function]: Drupal\give\Form\Donation\DonationForm->validateForm()
#8 /home/accdesign/public_html/web/core/lib/Drupal/Core/Form/FormValidator.php(82): call_user_func_array()
#9 /home/accdesign/public_html/web/core/lib/Drupal/Core/Form/FormValidator.php(275): Drupal\Core\Form\FormValidator->executeValidateHandlers()
#10 /home/accdesign/public_html/web/core/lib/Drupal/Core/Form/FormValidator.php(118): Drupal\Core\Form\FormValidator->doValidateForm()
#11 /home/accdesign/public_html/web/core/lib/Drupal/Core/Form/FormBuilder.php(593): Drupal\Core\Form\FormValidator->validateForm()
#12 /home/accdesign/public_html/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm()
#13 /home/accdesign/public_html/web/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(48): Drupal\Core\Form\FormBuilder->buildForm()
#14 /home/accdesign/public_html/web/modules/contrib/give/src/Entity/GiveFormViewBuilder.php(91): Drupal\Core\Entity\EntityFormBuilder->getForm()
#15 /home/accdesign/public_html/web/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php(134): Drupal\give\Entity\GiveFormViewBuilder->view()
#16 [internal function]: Drupal\Core\Entity\Controller\EntityViewController->view()
#17 /home/accdesign/public_html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#18 /home/accdesign/public_html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#19 /home/accdesign/public_html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#20 /home/accdesign/public_html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#21 /home/accdesign/public_html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#22 /home/accdesign/public_html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#23 /home/accdesign/public_html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#24 /home/accdesign/public_html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#25 /home/accdesign/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#26 /home/accdesign/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#27 /home/accdesign/public_html/web/modules/contrib/cleantalk/src/EventSubscriber/BootSubscriber.php(187): Drupal\page_cache\StackMiddleware\PageCache->handle()
#28 /home/accdesign/public_html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\cleantalk\EventSubscriber\BootSubscriber->handle()
#29 /home/accdesign/public_html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#30 /home/accdesign/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#31 /home/accdesign/public_html/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
#32 /home/accdesign/public_html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#33 {main}
.

If we use the default donation form, it does not do this.

Steps to reproduce

Add a new donation form
Try to use the new form

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Ben Coleman

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

Comments & Activities

Production build 0.69.0 2024