Hi.
I had a problem using REST to make crud operations with taxonomy terms.
I can do a POST request without problem.
But if i try to make a PATCH, or DELETE request i see the taxonomy view page. And, if i try to use GET, i receive http status 406 "Not acceptable" message, the same that this issue "Not Acceptable" for Taxonomy Terms via REST.
Debugging the code i've seen when url is matched with the controller it looks for the first controller he found in a list of routes, and that is the case of taxonomy. Ive seen this in line 164 of class Symfony\Component\Routing\Matcher\UrlMatcher, which call handleRouteRequirements method.
Seeing how rest module builds the routes, i tried to change the route and it works. Is possible change the route to {entity_type}/{id}/rest, for example, in order to avoid conflicts with other pages?
Attach a patch with the solution.
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| entity-resource-change-url-1.patch | 990 bytes | omarlopesino |
Comments
Comment #3
marcingy commentedThis is major I believe not critical
Comment #4
wim leersThis is a duplicate of #2449143: REST views specify HTML as a possible request format, so if there is a "regular" HTML view on the same path, it will serve JSON.
Comment #5
avpadernoComment #6
avpaderno