manishkatyan / strapi-google-translator

Translate Strapi collections into multiple languages using Google Cloud Translation
10 stars 8 forks source link

Throws 400 error while saving translation of the content types consisting relations/components fields #20

Closed developerll closed 1 year ago

developerll commented 1 year ago

Description For any content type ( collection or single) that contains a mixture of normal fields such as text, string, and rich text, as well as relational fields like components and relations, the plugin is throwing error with status code 400 while translating the contents.

Screenshot of the dashboard dashboard-screeenshot

Screenshot of the CLI cmd_screenshot

While debugging further on the error details thrown on CLI it was found that the plugin is trying to save the translation via Strapi API. Then we imitated the Strapi API call from Postman using the same headers, method, and body as seen on that console. It was found that Strapi is throwing a Validation Error of status code 400 with the message "Undefined attribute level operator name". We could see that although the translation is successful, the issue is only while the plugin is trying to save the translated content.

image

nishekh-e-r commented 1 year ago

@developerll did you add the strapi API token to API calls, and also you can refer installation section to refer to generate the API token https://www.npmjs.com/package/strapi-google-translator.

nishekh-e-r commented 1 year ago

@developerll The features - translation of “Components.”, and translation of mixed fields - are the features that are beyond the scope of the free version of the plugin.