Problem/Motivation

The settings form shows an error on a fresh install with PHP 8:

TypeError: array_column(): Argument #1 ($array) must be of type array, null given in array_column() (line 389 of modules/contrib/orejime/src/Form/OrejimeSettingsForm.php).
array_column(NULL, 'weight') (Line: 389)
Drupal\orejime\Form\OrejimeSettingsForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 531)
Drupal\Core\Form\FormBuilder->retrieveForm('orejime_settings', Object) (Line: 278)
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: 564)
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: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
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: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

This happens because the new categories key was not added to the default settings config.

CommentFileSizeAuthor
#4 3259347-4.patch1.45 KBdieterholvoet

Issue fork orejime-3259347

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

DieterHolvoet created an issue. See original summary.

dieterholvoet’s picture

Status: Active » Needs review
dieterholvoet’s picture

StatusFileSize
new1.45 KB

Added a patch of the current state of the MR for easy applying in projects.

  • Fabsgugu committed e4aa20c on 8.x-1.x authored by DieterHolvoet
    Issue #3259347: Error on settings form after installing module with PHP...
fabsgugu’s picture

Status: Needs review » Fixed

Thanks for the fix!
I tested it, and it fixes the problem.

I will deploy a new version.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.