Problem/Motivation

We have restful endpoints that use jsonapi subrequests to get the data, based on the method described in this issue:

https://www.drupal.org/project/jsonapi/issues/3031445

This was working fine up to 11.3.12, but we just upgraded to 11.4.7 and now it works on the first call, but subsequent calls return the jsonapi response instead of our massaged restful response.

We are using redis for caching. If we disable redis the problem goes away.

Steps to reproduce

Enable caching (redis specifically? not sure)
Perform a sub request in a restful endpoint as described in the above issue, and return massaged data
The first call to the endpoint returns correct results
The second call returns the original jsonapi response

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

lambic created an issue. See original summary.

lambic’s picture

Noting that it looks like changing 'http_kernel.basic' to 'http_kernel' fixes the issue, although in the original issue it says using 'http_kernel' can cause problems.

quietone’s picture

Version: 11.4.x-dev » main
Issue tags: -jsonapi

Hi, Issues for Drupal core should be targeted to the 'main' branch, our primary development branch. Changes are made on the main branch first, and are then back ported as needed according to the Core change policies. The version the problem was discovered on should be stated in the issue summary Problem/Motivation section. Thanks.