Describe the bug
When you have a entity with a repeatable component, that itself contains the JSON field type, translation will fail to save - even if the component is marked as non-translatable.
To Reproduce
create a reusable component with a json field
create a entity that uses the reusable compoinent
fill out the original entity
create a new locale
try to translate the entity after saving.
observe the following error
TypeError: (i.doc || "").split is not a function
at na.create (main.1c8cf574.js:3702:27812)
at main.1c8cf574.js:3711:66977
at Li (main.1c8cf574.js:1102:25330)
at Kf (main.1c8cf574.js:1102:44207)
at mh (main.1c8cf574.js:1102:42943)
at Vf (main.1c8cf574.js:1102:41960)
at d4 (main.1c8cf574.js:1102:38431)
at Hl (main.1c8cf574.js:1100:3311)
at main.1c8cf574.js:1102:35725
Expected behavior
It looks like it is an issue with mapping to the component structure, naturally the translation should succeed.
Screenshots
If applicable, add screenshots to help explain your problem.
System (please complete the following information):
OS: [e.g. Linux]
Browser brave
Versions:
strapi: 4.24.0
strapi-plugin-translate: 1.2.4
provider: strapi-provider-translate-deepl@1.1.2
Plugin config
Please add your plugin config here, e.g.
module.exports = {
translate: {
enabled: true,
config: {
// Choose one of the available providers
provider: "deepl",
// Pass credentials and other options to the provider
providerOptions: {
// use custom locale mapping (for example 'en' locale is deprecated so need to choose between 'EN-GB' and 'EN-US')
localeMap: {
// use uppercase here!
EN: "EN-US",
},
apiOptions: {
formality: "default",
},
},
translatedFieldTypes: [
"string",
{ type: "json", format: "plain" },
{ type: "text", format: "plain" },
{ type: "richtext", format: "markdown" },
"component",
"dynamiczone",
],
translateRelations: true,
},
}
Additional context
Add any other context about the problem here.
Describe the bug When you have a entity with a repeatable component, that itself contains the JSON field type, translation will fail to save - even if the component is marked as non-translatable.
To Reproduce
create a reusable component with a json field
create a entity that uses the reusable compoinent
fill out the original entity
create a new locale
try to translate the entity after saving.
observe the following error
Expected behavior
It looks like it is an issue with mapping to the component structure, naturally the translation should succeed.
Screenshots If applicable, add screenshots to help explain your problem.
System (please complete the following information):
Plugin config Please add your plugin config here, e.g.
Additional context Add any other context about the problem here.