Translatepress tags and categories not working for custom post type
-
Hi, I use the latest versions of PODS Cms along with TranslatePress. Don’t know if this is a problem coming from one or the other, anyway.
I have a site with two languages (en/fr), and a custom post type handled by PODS, with enabled connections to tags and categories.
Both tags and categories work just fine in the primary language (English). Unlike custom fields, though, not only tags and categories are not automatically synced by TranslatePress, but they do not work at all while editing the custom post in the secondary language.
So whenever I try to add a tag or category to the post in French, the tag or category is simply not added. I’ve also tried to unsync taxonomies in Translatepress settings, but with no luck.
When I analyze the XHR in Chrome after trying to create a “doc” category, I see a call to /wp-json/wp/v2/categories?_locale=user with this result :
{"id":69,"count":1,"description":"","link":"http:\/\/belea.local\/category\/doc\/","name":"doc","slug":"doc","taxonomy":"category","parent":0,"meta":[],"_links":{"self":[{"href":"http:\/\/belea.local\/wp-json\/wp\/v2\/categories\/69"}],"collection":[{"href":"http:\/\/belea.local\/wp-json\/wp\/v2\/categories"}],"about":[{"href":"http:\/\/belea.local\/wp-json\/wp\/v2\/taxonomies\/category"}],"wp:post_type":[{"href":"http:\/\/belea.local\/wp-json\/wp\/v2\/posts?categories=69"},{"href":"http:\/\/belea.local\/wp-json\/wp\/v2\/project?categories=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
Then I see a call to /wp-json/wp/v2/categories?context=edit&lang=fr&_locale=user with this response:
{"code":"rest_forbidden_context","message":"Sorry, you are not allowed to edit terms in this taxonomy.","data":{"status":401}}
Then I see a call to /wp-json/wp/v2/categories?context=view&per_page=100&orderby=name&order=asc&_fields=id%2Cname%2Cparent&lang=fr&_locale=user with this response:
[{"id":1,"name":"Uncategorized","parent":0}]
And no category “doc” is created for the foreign language post.
Any ideas ?
Thanks in advance
- The topic ‘Translatepress tags and categories not working for custom post type’ is closed to new replies.