Closed Cruiser13 closed 2 weeks ago
Do you have a custom processor and/or custom event listeners? that are called on this route?
Thank you for your reply - not on this route, no. This affects all entities for us. Attached are the events at POST.
We found the issue thanks to @soyuka - we had to return the processor in the process function of our state processor (has been void before). Solved!
API Platform version(s) affected: 3.4.5
Description
In 3.1 any POST or PUT with json returned the created object in json to the browser, same as the GET endpoint. We updated to 3.4.5 recently and now we only get null as response on a POST / PUT, status code is 200 and object is created though. We looked through the changelog of api platform and did not see a breaking change like that. We even tried to set use_symfony_listeners: true but it did not have any effect.
Here is a related stack overflow issue: https://stackoverflow.com/questions/79061122/api-platform-post-put-request-return-body-is-null
How to reproduce
Setup api platform 3.4.5 with a demo entity and call the POST or PUT endpoint using jsonld or json.
Additional Context
Our api_platform.yaml looks like this: