Creating or editing a node in D10 with RoP enabled causes an exception error

Created on 7 April 2023, about 1 year ago
Updated 25 July 2023, 11 months ago

Problem/Motivation

We just upgraded our site from D9 to D10 and installed the automated upgrade patch located here: https://www.drupal.org/project/require_on_publish/issues/3289335 πŸ“Œ Automated Drupal 10 compatibility fixes Fixed

Creating or editing a node in D10 with RoP enabled causes an exception error

Steps to reproduce

1. Launch D10 Drupal Site
2. Install & Enable Require on Publish
3. Install the D10 patch at https://www.drupal.org/project/require_on_publish/issues/3289335 πŸ“Œ Automated Drupal 10 compatibility fixes Fixed
4. Create or edit any existing content node on the site
5. Observe Exception

The website encountered an unexpected error. Please try again later.

InvalidArgumentException: Expected a scalar value as a 2nd argument to "Symfony\Component\HttpFoundation\InputBag::get()", "array" given. in Symfony\Component\HttpFoundation\InputBag->get() (line 31 of /opt/drupal/web/vendor/symfony/http-foundation/InputBag.php).
Drupal\require_on_publish\Plugin\Validation\Constraint\RequireOnPublishValidator->validate(Object, Object) (Line: 202)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateConstraints(Object, '0000000000000c940000000000000000', Array) (Line: 154)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode(Object, Array, 1) (Line: 106)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate(Object, NULL, NULL) (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate(Object) (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 489)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 248)
Drupal\Core\Entity\Entity\EntityFormDisplay->validateFormValues(Object, Array, Object) (Line: 2322)
Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget->massageFormValues(Array, Array, Object) (Line: 395)
Drupal\Core\Field\WidgetBase->extractFormValues(Object, Array, Object) (Line: 2382)
Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget->extractFormValues(Object, Array, Object) (Line: 237)
Drupal\Core\Entity\Entity\EntityFormDisplay->extractFormValues(Object, Array, Object) (Line: 334)
Drupal\Core\Entity\ContentEntityForm->copyFormValuesToEntity(Object, Array, Object) (Line: 293)
Drupal\Core\Entity\EntityForm->buildEntity(Array, Object) (Line: 155)
Drupal\Core\Entity\ContentEntityForm->buildEntity(Array, Object) (Line: 186)
Drupal\Core\Entity\ContentEntityForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'node_result_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('node_result_form', Array, Object) (Line: 591)
Drupal\Core\Form\FormBuilder->processForm('node_result_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object) (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->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: 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: 686)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Proposed resolution

No exception occurs

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024