Warning: Undefined array key "sub-content-type"

Created on 9 August 2023, over 1 year ago
Updated 27 October 2023, about 1 year ago

Problem/Motivation

I keep seeing the following error pop up for me:

Warning: Undefined array key "sub-content-type" in Drupal\subrequests\Normalizer\MultiresponseJsonNormalizer->normalize() (line 19 of modules/contrib/subrequests/src/Normalizer/MultiresponseJsonNormalizer.php).
Drupal\subrequests\Normalizer\MultiresponseJsonNormalizer->normalize(Array, 'json', Array) (Line: 159)
Symfony\Component\Serializer\Serializer->normalize(Array, 'json', Array) (Line: 177)
Symfony\Component\Serializer\Serializer->normalize(Array, 'json', Array) (Line: 177)
Symfony\Component\Serializer\Serializer->normalize(Array, 'json', Array) (Line: 138)
Symfony\Component\Serializer\Serializer->serialize(Array, 'json', Array) (Line: 159)
Drupal\rest\EventSubscriber\ResourceResponseSubscriber->renderResponseBody(Object, Object, Object, 'json') (Line: 75)
Drupal\rest\EventSubscriber\ResourceResponseSubscriber->onResponse(Object, 'kernel.response', Object)
call_user_func(Array, Object, 'kernel.response', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.response') (Line: 199)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 187)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
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: 191)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
Drupal\page_cache\StackMiddleware\PageCache->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: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

I’m not sure exactly. The issue is intermittent.

Proposed resolution

Check for the "sub-content-type" key.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States daniel korte Brooklyn, NY

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

Comments & Activities

Production build 0.71.5 2024