Closed (fixed)
Project:
Subrequests
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2022 at 17:13 UTC
Updated:
1 Jan 2024 at 21:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
quadrexdevI've created a merge request with a fix. Please, review.
Comment #4
e0ipsoComment #5
quadrexdevI've fixed this issue, thanks for highlighting it.
Comment #6
joachim commentedI'm seeing this in a custom JSON endpoint where we're returning a Drupal\rest\ResourceResponse.
Patch fixes the problem.
Comment #7
uditrawatUpdated patch for version 3.0.7
Comment #8
binnythomas commentedThe fix @#7@ works for me.
Comment #9
joachim commentedUpdated the MR.
Comment #10
mglamanHow could
sub-content-typebe empty? It should be populated by\Drupal\subrequests\Blueprint\BlueprintManager::negotiateSubContentType.The bug seems to be in
\Drupal\subrequests\Normalizer\MultiresponseJsonNormalizer::supportsNormalizationnormalizing things it shouldn't be. That's why the context doesn't match.Comment #11
mglamanComment #12
mglamanClosed #3096577: Multiresponse normalizer invalid headers "sub-content-type" as a duplicate, I can't copy over an issue credits but it'd be nice to incorporate those folks into this ticket.
I think the root fix is still in
supportsNormalization. Notnormalize, since the$contextis maldformed.Comment #14
mglamanI've opened https://git.drupalcode.org/project/subrequests/-/merge_requests/22
Based on the related issues, the problem seems to occur when there is an empty array being normalized.
Comment #21
e0ipsoThis looks good!
I am adding issue credit as suggested above.
Comment #23
e0ipso