- 🇨🇳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}",
- First commit to issue fork.
- Merge request !63Issue #3327472: Fix for null argument in array_intersect_key(). → (Open) created by Unnamed author