Problem/Motivation
After updated modules about Json:API, explorer not working anymore.
After some search, I fixed the first visible error with the patch in this issue : TypeError: Argument 1 passed to JsonApiSchemaController
But after applied the patch, explorer still not working. I see in the production website (not already push the update module) the explorer call one time the /jsonapi/schema url. And after update I see more than 300 calls for schemas.
The main difference is in "targetSchema" attribute :
before
"type": "object",
"links": [
{
"href": "{instanceHref}",
"rel": "related",
"title": "Platform entities",
"targetMediaType": "application/vnd.api+json",
"targetSchema": "https://xxxx/jsonapi/platform/platform/collection/schema",
"templatePointers": {
"instanceHref": "/links/platform--platform/href"
},
"templateRequired": [
"instanceHref"
]
},
...
And after update
"type": "object",
"links": [
{
"href": "{instanceHref}",
"rel": "related",
"title": "Platform entities",
"targetMediaType": "application/vnd.api+json",
"targetSchema": {
"$ref": "https://xxxx/jsonapi/platform/platform/collection/schema"
},
"templatePointers": {
"instanceHref": "/links/platform--platform/href"
},
"templateRequired": [
"instanceHref"
]
},
...
Proposed resolution
I propose you an patch quick-fix to prevent this issue.
But, with more background whole feature/project the patch isn't the correct solution.
Comments
Comment #2
niknakComment #3
niknakComment #4
niknakComment #5
m.stentaWe have automated tests now (#3257911: Add basic test coverage) so it would be good to include a test to demonstrate this issue and prevent regressions.