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!

CommentFileSizeAuthor
entity-resource-change-url-1.patch990 bytesomarlopesino

Comments

mistermoper created an issue. See original summary.

Status: Needs review » Needs work

The last submitted patch, entity-resource-change-url-1.patch, failed testing.

marcingy’s picture

Priority: Critical » Major

This is major I believe not critical

avpaderno’s picture

Assigned: omarlopesino » Unassigned
Issue tags: -#entity, - + #entity
avpaderno’s picture

Issue tags: -#rest, -#taxonomy, - #entity