- 🇩🇪Germany spuky
@adwivedi008
The patch in comment #5 works for me in D10 and I'd guess it should work for D9.5 also...
When a request is sent to json API, the language prefix in the url allow currently to get the translation of a resource.
For example, a request to /fr/jsonapi/media/image/e5bf48ba-81d5-4caf-91df-a2c0a8563440/field_media_image will allow to get the field field_media_image value for the french version of the media.
However, if a resourceVersion parameter is added to the url, the specified version will be loaded but the translation will be lost.
For example, a request to /fr/jsonapi/media/image/e5bf48ba-81d5-4caf-91df-a2c0a8563440/field_media_image?resourceVersion=id:2 will provide the field field_media_image value for the revision 2 of the media but in the original language.
A solution could be to modify the ResourceVersionRouteEnhancer.php with a new condition to check if the resource is a content one and then load the right translation in this case (pulling it from the original entity).
Needs work
11.0 🔥
Last updated
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
@adwivedi008
The patch in comment #5 works for me in D10 and I'd guess it should work for D9.5 also...