[wp-gsoc] [WordPRess GSoC Trac] #384: [JSON-API v1.1.1] No route found when using taxonomies with hyphens
WordPRess GSoC Trac
noreply at wordpress.org
Fri Nov 7 11:09:36 UTC 2014
#384: [JSON-API v1.1.1] No route found when using taxonomies with hyphens
---------------------------+--------------------
Reporter: Paco Ortiz | Owner: rmccue
Type: defect | Status: new
Priority: normal | Milestone:
Component: JSON REST API | Keywords:
---------------------------+--------------------
When using taxonomies with hyphens like "my-taxonomy", you get routing
errors for URLs like
/wp-json/taxonomies/my-taxonomy/
I think the problem comes when registering the regular expression for the
route at WP_JSON_Taxonomies->register_routes, one example:
'/posts/types/(?P<type>\w+)/taxonomies/(?P<taxonomy>\w+)'
doesn't cover taxonomies with hyphens.
However this regex does work:
'/posts/types/(?P<type>\w+)/taxonomies/(?P<taxonomy>[\w|\-]+)'
Just to make it known.
Thanks for the great job with this nice API.
--
Ticket URL: <https://gsoc.trac.wordpress.org/ticket/384>
WordPRess GSoC Trac <https://gsoc.trac.wordpress.org/>
WordPress Google Summer of Code Trac
More information about the wp-gsoc
mailing list