Error when saving configuration

Created on 3 June 2024, 7 months ago
Updated 17 June 2024, 6 months ago

Problem/Motivation

I am not able to save settings, because when trying to save i get an unexpected error

Steps to reproduce

  1. Install the module via Drush(version 3.0.3 with Drupal 10.2.6)
  2. Open message configuration admin/page-notifications/tabs/default/second
  3. Enter required fields
  4. Click submit

Step 1 generates warnings:

drush install page_notifications
 [warning] Undefined array key "checkbox_field" page_notifications.module:107
 [warning] Undefined array key "notes_field" page_notifications.module:108
 [warning] Undefined array key "checkbox_field" page_notifications.module:107
 [warning] Undefined array key "notes_field" page_notifications.module:108
 [warning] Undefined array key "checkbox_field" page_notifications.module:107
 [warning] Undefined array key "notes_field" page_notifications.module:108
 [warning] Undefined array key "checkbox_field" page_notifications.module:107
 [warning] Undefined array key "notes_field" page_notifications.module:108
 [warning] Undefined array key "checkbox_field" page_notifications.module:107
 [warning] Undefined array key "notes_field" page_notifications.module:108
 [warning] Undefined array key "checkbox_field" page_notifications.module:107
 [warning] Undefined array key "notes_field" page_notifications.module:108
 [warning] Undefined array key "checkbox_field" page_notifications.module:107
 [warning] Undefined array key "notes_field" page_notifications.module:108
 [warning] Undefined array key "checkbox_field" page_notifications.module:107
 [warning] Undefined array key "notes_field" page_notifications.module:108
 [warning] Undefined array key "checkbox_field" page_notifications.module:107
 [warning] Undefined array key "notes_field" page_notifications.module:108

Step 4 results in an error;

The website encountered an unexpected error. Try again later.

Error: Class "Drupal\page_notifications\Form\Drupal" not found in Drupal\page_notifications\Form\MessagesForm->submitForm() (line 265 of modules/contrib/page_notifications/src/Form/MessagesForm.php).

call_user_func_array(Array, Array) (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('form_api_example_build_form', Array, Object) (Line: 325)
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: 627)
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: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 68)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->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: 28)
Drupal\Core\StackMiddleware\ContentLength->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: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands robbertnl

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

Comments & Activities

Production build 0.71.5 2024