Single Nested Property Enhancer TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, null given in array_intersect_key() (line 80 of web/modules/contrib/jsonapi_extras/src/Normalizer/ResourceIdentifierNormalizer.php)

Created on 15 December 2022, almost 2 years ago
Updated 23 July 2024, 4 months ago

Problem/Motivation

While trying to figure out how to have json api display the value of a entity reference field as an embedded json document,
i tried to use the Advanced Enhancer feature of jsonapi_extras and changed the config of my ent_ref field with:

Enhancer for: field_my_ent_ref > [ Single Nested Property ]

and then when querying the content over json api, it bombed out with this unhandled exception 500 error:

TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, null given in array_intersect_key() (line 80 of /var/app/current/web/modules/contrib/jsonapi_extras/src/Normalizer/ResourceIdentifierNormalizer.php)
#0 /var/app/current/web/modules/contrib/jsonapi_extras/src/Normalizer/ResourceIdentifierNormalizer.php(80): array_intersect_key(NULL, Array)
#1 /var/app/current/vendor/symfony/serializer/Serializer.php(153): Drupal\jsonapi_extras\Normalizer\ResourceIdentifierNormalizer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceIdentifier), 'api_json', Object(Shaper\Util\Context))
#2 /var/app/current/web/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\Component\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceIdentifier), 'api_json', Array)
#3 /var/app/current/web/core/modules/jsonapi/src/Normalizer/DataNormalizer.php(26): Drupal\jsonapi\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceIdentifier), 'api_json', Array)
#4 [internal function]: Drupal\jsonapi\Normalizer\DataNormalizer->Drupal\jsonapi\Normalizer\{closure}(Object(Drupal\jsonapi\JsonApiResource\ResourceIdentifier))
#5 /var/app/current/web/core/modules/jsonapi/src/Normalizer/DataNormalizer.php(27): array_map(Object(Closure), Array)
#6 /var/app/current/vendor/symfony/serializer/Serializer.php(153): Drupal\jsonapi\Normalizer\DataNormalizer->normalize(Object(Drupal\jsonapi\JsonApiResource\RelationshipData), 'api_json', Array)
#7 /var/app/current/web/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\Component\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\RelationshipData), 'api_json', Array)
#8 /var/app/current/web/core/modules/jsonapi/src/Normalizer/RelationshipNormalizer.php(26): Drupal\jsonapi\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\RelationshipData), 'api_json', Array)
#9 /var/app/current/vendor/symfony/serializer/Serializer.php(153): Drupal\jsonapi\Normalizer\RelationshipNormalizer->normalize(Object(Drupal\jsonapi\JsonApiResource\Relationship), 'api_json', Array)
#10 /var/app/current/web/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\Component\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\Relationship), 'api_json', Array)
#11 /var/app/current/web/core/modules/jsonapi/src/Normalizer/ResourceObjectNormalizer.php(183): Drupal\jsonapi\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\Relationship), 'api_json', Array)
#12 /var/app/current/web/core/modules/jsonapi/src/Normalizer/ResourceObjectNormalizer.php(121): Drupal\jsonapi\Normalizer\ResourceObjectNormalizer->serializeField(Object(Drupal\Core\Field\EntityReferenceFieldItemList), Array, 'api_json')
#13 /var/app/current/web/core/modules/jsonapi/src/Normalizer/ResourceObjectNormalizer.php(73): Drupal\jsonapi\Normalizer\ResourceObjectNormalizer->getNormalization(Array, Object(Drupal\jsonapi\JsonApiResource\ResourceObject), 'api_json', Array)
#14 /var/app/current/web/modules/contrib/jsonapi_extras/src/Normalizer/JsonApiNormalizerDecoratorBase.php(38): Drupal\jsonapi\Normalizer\ResourceObjectNormalizer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceObject), 'api_json', Array)
#15 /var/app/current/web/modules/contrib/jsonapi_extras/src/Normalizer/ResourceObjectNormalizer.php(24): Drupal\jsonapi_extras\Normalizer\JsonApiNormalizerDecoratorBase->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceObject), 'api_json', Array)
#16 /var/app/current/vendor/symfony/serializer/Serializer.php(153): Drupal\jsonapi_extras\Normalizer\ResourceObjectNormalizer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceObject), 'api_json', Array)
#17 /var/app/current/web/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\Component\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceObject), 'api_json', Array)
#18 /var/app/current/web/core/modules/jsonapi/src/Normalizer/DataNormalizer.php(26): Drupal\jsonapi\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceObject), 'api_json', Array)
#19 [internal function]: Drupal\jsonapi\Normalizer\DataNormalizer->Drupal\jsonapi\Normalizer\{closure}(Object(Drupal\jsonapi\JsonApiResource\ResourceObject))
#20 /var/app/current/web/core/modules/jsonapi/src/Normalizer/DataNormalizer.php(27): array_map(Object(Closure), Array)
#21 /var/app/current/vendor/symfony/serializer/Serializer.php(153): Drupal\jsonapi\Normalizer\DataNormalizer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceObjectData), 'api_json', Array)
#22 /var/app/current/web/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\Component\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceObjectData), 'api_json', Array)
#23 /var/app/current/web/core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php(193): Drupal\jsonapi\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\ResourceObjectData), 'api_json', Array)
#24 /var/app/current/vendor/symfony/serializer/Serializer.php(153): Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer->normalize(Object(Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel), 'api_json', Array)
#25 /var/app/current/web/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\Component\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel), 'api_json', Array)
#26 /var/app/current/web/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php(120): Drupal\jsonapi\Serializer\Serializer->normalize(Object(Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel), 'api_json', Array)
#27 /var/app/current/web/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php(85): Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber->renderResponseBody(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\jsonapi\CacheableResourceResponse), Object(Drupal\jsonapi\Serializer\Serializer), 'api_json')
#28 [internal function]: Drupal\jsonapi\EventSubscriber\ResourceResponseSubscriber->onResponse(Object(Symfony\Component\HttpKernel\Event\ResponseEvent), 'kernel.response', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#29 /var/app/current/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ResponseEvent), 'kernel.response', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#30 /var/app/current/vendor/symfony/http-kernel/HttpKernel.php(202): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ResponseEvent), 'kernel.response')
#31 /var/app/current/vendor/symfony/http-kernel/HttpKernel.php(190): Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object(Drupal\jsonapi\CacheableResourceResponse), Object(Symfony\Component\HttpFoundation\Request), 1)
#32 /var/app/current/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#33 /var/app/current/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /var/app/current/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /var/app/current/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /var/app/current/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /var/app/current/web/modules/contrib/webform_product/src/RedirectMiddleware.php(42): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /var/app/current/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\webform_product\RedirectMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#39 /var/app/current/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#40 /var/app/current/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#41 /var/app/current/web/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#42 /var/app/current/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#43 {main}
.

Steps to reproduce

Create a content type with an entity reference field to another content type.

Use the Advanced Enhancer feature of jsonapi_extras and change the config of your ent_ref field with:

Enhancer for: field_your_ent_ref > [ Single Nested Property ]

Proposed resolution

Fix jsonapi to allow to display the value of an ent_ref field as a nested json document easily

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.23

Component

Code

Created by

🇺🇸United States jacov

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇳China lawxen

    I got the same error

    "errors": [
    {
    "title": "Internal Server Error",
    "status": "500",
    "detail": "array_intersect_key(): Argument #1 ($array) must be of type array, null given",
    "links": {
    "via": {
    "href": "http://appcms.docker/jsonapi/node/section"
    },
    "info": {
    "href": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1"
    }
    },
    "source": {
    "file": "/var/www/html/docroot/core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php",
    "line": 49
    },
    "meta": {
    "exception": "TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, null given in /var/www/html/docroot/modules/contrib/jsonapi_extras/src/Normalizer/ResourceIdentifierNormalizer.php:82\nStack trace:\n#0 /var/www/html/docroot/modules/contrib/jsonapi_extras/src/Normalizer/ResourceIdentifierNormalizer.php(82): array_intersect_key(NULL, Array)\n#1 /var/www/html/vendor/symfony/serializer/Serializer.php(159): Drupal\\jsonapi_extras\\Normalizer\\ResourceIdentifierNormalizer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceIdentifier), 'api_json', Object(Shaper\\Util\\Context))\n#2 /var/www/html/docroot/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\\Component\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceIdentifier), 'api_json', Array)\n#3 /var/www/html/docroot/core/modules/jsonapi/src/Normalizer/DataNormalizer.php(21): Drupal\\jsonapi\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceIdentifier), 'api_json', Array)\n#4 [internal function]: Drupal\\jsonapi\\Normalizer\\DataNormalizer->Drupal\\jsonapi\\Normalizer\\{closure}(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceIdentifier))\n#5 /var/www/html/docroot/core/modules/jsonapi/src/Normalizer/DataNormalizer.php(20): array_map(Object(Closure), Array)\n#6 /var/www/html/vendor/symfony/serializer/Serializer.php(159): Drupal\\jsonapi\\Normalizer\\DataNormalizer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\RelationshipData), 'api_json', Array)\n#7 /var/www/html/docroot/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\\Component\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\RelationshipData), 'api_json', Array)\n#8 /var/www/html/docroot/core/modules/jsonapi/src/Normalizer/RelationshipNormalizer.php(21): Drupal\\jsonapi\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\RelationshipData), 'api_json', Array)\n#9 /var/www/html/vendor/symfony/serializer/Serializer.php(159): Drupal\\jsonapi\\Normalizer\\RelationshipNormalizer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\Relationship), 'api_json', Array)\n#10 /var/www/html/docroot/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\\Component\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\Relationship), 'api_json', Array)\n#11 /var/www/html/docroot/core/modules/jsonapi/src/Normalizer/ResourceObjectNormalizer.php(178): Drupal\\jsonapi\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\Relationship), 'api_json', Array)\n#12 /var/www/html/docroot/core/modules/jsonapi/src/Normalizer/ResourceObjectNormalizer.php(116): Drupal\\jsonapi\\Normalizer\\ResourceObjectNormalizer->serializeField(Object(Drupal\\entity_reference_revisions\\EntityReferenceRevisionsFieldItemList), Array, 'api_json')\n#13 /var/www/html/docroot/core/modules/jsonapi/src/Normalizer/ResourceObjectNormalizer.php(68): Drupal\\jsonapi\\Normalizer\\ResourceObjectNormalizer->getNormalization(Array, Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObject), 'api_json', Array)\n#14 /var/www/html/docroot/modules/contrib/jsonapi_extras/src/Normalizer/JsonApiNormalizerDecoratorBase.php(38): Drupal\\jsonapi\\Normalizer\\ResourceObjectNormalizer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObject), 'api_json', Array)\n#15 /var/www/html/docroot/modules/contrib/jsonapi_extras/src/Normalizer/ResourceObjectNormalizer.php(24): Drupal\\jsonapi_extras\\Normalizer\\JsonApiNormalizerDecoratorBase->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObject), 'api_json', Array)\n#16 /var/www/html/vendor/symfony/serializer/Serializer.php(159): Drupal\\jsonapi_extras\\Normalizer\\ResourceObjectNormalizer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObject), 'api_json', Array)\n#17 /var/www/html/docroot/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\\Component\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObject), 'api_json', Array)\n#18 /var/www/html/docroot/core/modules/jsonapi/src/Normalizer/DataNormalizer.php(21): Drupal\\jsonapi\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObject), 'api_json', Array)\n#19 [internal function]: Drupal\\jsonapi\\Normalizer\\DataNormalizer->Drupal\\jsonapi\\Normalizer\\{closure}(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObject))\n#20 /var/www/html/docroot/core/modules/jsonapi/src/Normalizer/DataNormalizer.php(20): array_map(Object(Closure), Array)\n#21 /var/www/html/vendor/symfony/serializer/Serializer.php(159): Drupal\\jsonapi\\Normalizer\\DataNormalizer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObjectData), 'api_json', Array)\n#22 /var/www/html/docroot/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\\Component\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObjectData), 'api_json', Array)\n#23 /var/www/html/docroot/core/modules/jsonapi/src/Normalizer/JsonApiDocumentTopLevelNormalizer.php(188): Drupal\\jsonapi\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\ResourceObjectData), 'api_json', Array)\n#24 /var/www/html/vendor/symfony/serializer/Serializer.php(159): Drupal\\jsonapi\\Normalizer\\JsonApiDocumentTopLevelNormalizer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\JsonApiDocumentTopLevel), 'api_json', Array)\n#25 /var/www/html/docroot/core/modules/jsonapi/src/Serializer/Serializer.php(62): Symfony\\Component\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\JsonApiDocumentTopLevel), 'api_json', Array)\n#26 /var/www/html/docroot/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php(120): Drupal\\jsonapi\\Serializer\\Serializer->normalize(Object(Drupal\\jsonapi\\JsonApiResource\\JsonApiDocumentTopLevel), 'api_json', Array)\n#27 /var/www/html/docroot/core/modules/jsonapi/src/EventSubscriber/ResourceResponseSubscriber.php(85): Drupal\\jsonapi\\EventSubscriber\\ResourceResponseSubscriber->renderResponseBody(Object(Symfony\\Component\\HttpFoundation\\Request), Object(Drupal\\jsonapi\\CacheableResourceResponse), Object(Drupal\\jsonapi\\Serializer\\Serializer), 'api_json')\n#28 [internal function]: Drupal\\jsonapi\\EventSubscriber\\ResourceResponseSubscriber->onResponse(Object(Symfony\\Component\\HttpKernel\\Event\\ResponseEvent), 'kernel.response', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#29 /var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\\Component\\HttpKernel\\Event\\ResponseEvent), 'kernel.response', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#30 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(214): Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->dispatch(Object(Symfony\\Component\\HttpKernel\\Event\\ResponseEvent), 'kernel.response')\n#31 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(202): Symfony\\Component\\HttpKernel\\HttpKernel->filterResponse(Object(Drupal\\jsonapi\\CacheableResourceResponse), Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#32 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#33 /var/www/html/docroot/modules/contrib/redirect_after_login/src/RedirectMiddleware.php(44): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#34 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Drupal\\redirect_after_login\\RedirectMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#35 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\\Core\\StackMiddleware\\Session->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#36 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#37 /var/www/html/docroot/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\\Core\\StackMiddleware\\ContentLength->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#38 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\\big_pipe\\StackMiddleware\\ContentLength->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#39 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\\page_cache\\StackMiddleware\\PageCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#40 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\\page_cache\\StackMiddleware\\PageCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#41 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#42 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#43 /var/www/html/docroot/modules/contrib/error_page/src/StackMiddleware/StackMiddlewareErrorPage.php(44): Drupal\\Core\\StackMiddleware\\AjaxPageState->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#44 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\\error_page\\StackMiddleware\\StackMiddlewareErrorPage->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#45 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\\Core\\StackMiddleware\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#46 /var/www/html/docroot/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#47 {main}\n\nNext Symfony\\Component\\HttpKernel\\Exception\\HttpException: array_intersect_key(): Argument #1 ($array) must be of type array, null given in /var/www/html/docroot/core/modules/jsonapi/src/EventSubscriber/DefaultExceptionSubscriber.php:49\nStack trace:\n#0 [internal function]: Drupal\\jsonapi\\EventSubscriber\\DefaultExceptionSubscriber->onException(Object(Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#1 /var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#2 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(239): Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->dispatch(Object(Symfony\\Component\\HttpKernel\\Event\\ExceptionEvent), 'kernel.exceptio...')\n#3 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(91): Symfony\\Component\\HttpKernel\\HttpKernel->handleThrowable(Object(TypeError), Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#4 /var/www/html/docroot/modules/contrib/redirect_after_login/src/RedirectMiddleware.php(44): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#5 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Drupal\\redirect_after_login\\RedirectMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#6 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\\Core\\StackMiddleware\\Session->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#7 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#8 /var/www/html/docroot/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\\Core\\StackMiddleware\\ContentLength->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#9 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\\big_pipe\\StackMiddleware\\ContentLength->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#10 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\\page_cache\\StackMiddleware\\PageCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#11 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\\page_cache\\StackMiddleware\\PageCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#12 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#13 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#14 /var/www/html/docroot/modules/contrib/error_page/src/StackMiddleware/StackMiddlewareErrorPage.php(44): Drupal\\Core\\StackMiddleware\\AjaxPageState->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#15 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\\error_page\\StackMiddleware\\StackMiddlewareErrorPage->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#16 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\\Core\\StackMiddleware\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#17 /var/www/html/docroot/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#18 {main}",
  • 🇮🇳India jabastin arul Chennai

    I am also facing the same issue

Production build 0.71.5 2024