- Issue created by @hebl
- Status changed to Postponed: needs info
over 1 year ago 12:39pm 27 February 2023 Drupal core doesnโt have a shield module so the steps to reproduce cannot be accurate.
- ๐ฎ๐ณIndia sourav_paul Kolkata
@cilefen I am also facing the same issue...
- ๐บ๐ธUnited States maxstarkenburg Washington, DC
I'm reproducing this error by visiting
/admin/config/regional/language/detection
on a D10.0.11 (php 8.1.17) site that doesn't useshield
. Here's what I'm seeing instead:The website encountered an unexpected error. Please try again later. TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 137 of core/modules/language/src/Form/NegotiationConfigureForm.php). Drupal\language\Form\NegotiationConfigureForm->buildForm() call_user_func_array() (Line: 536) Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 283) Drupal\Core\Form\FormBuilder->buildForm() (Line: 73) Drupal\Core\Controller\FormController->getContentResult() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 74) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 692) Drupal\Core\DrupalKernel->handle() (Line: 19)
However, I tried to reproduce on different site (9.5.11, php 8.1.24) and couldn't reproduce there (page seemed to load fine, and no dblog warnings). Haven't done a full dig into what other site differences might explain the error on the former vs. lack thereof on the latter.
- ๐บ๐ธUnited States cybercoda
Status report shows "The Content Language Settings entity type needs to be installed." after upgrade from Drupal 8 to Drupal 9. Tried upgrading from Drupal 9 to Drupal 10 but still have the "The Content Language Settings entity type needs to be installed.". Went I try to visit "/admin/config/regional/language" or "/admin/config/regional/language/detection" on either site to set content language I get "The website encountered an unexpected error. Please try again later.". Watchdog shows the following error...
TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 137 of /var/www/html/web/core/modules/language/src/Form/NegotiationConfigureForm.php)
#0 /var/www/html/web/core/modules/language/src/Form/NegotiationConfigureForm.php(137): in_array('language_interf...', NULL)
#1 [internal function]: Drupal\language\Form\NegotiationConfigureForm->buildForm(Array, Object(Drupal\Core\Form\FormState))
#2 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(536): call_user_func_array(Array, Array)
#3 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(283): Drupal\Core\Form\FormBuilder->retrieveForm('language_negoti...', Object(Drupal\Core\Form\FormState))
#4 /var/www/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\language\Form\NegotiationConfigureForm), Object(Drupal\Core\Form\FormState))
#5 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#6 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#7 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#8 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#9 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#10 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#12 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#13 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#21 {main} - ๐ณ๐ฟNew Zealand quietone
Is this error preventing any site from upgrading to a supported version of Drupal?
If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue โ (starting from "Install Drupal core")
If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!