Closed appfr3d closed 10 months ago
Looks like if you add an internationalizedArrayString
field type to the document itself, it works as expected. This is because of this check, which doesn't check for nested arrays of objects.
It looks like the flattenSchema
doesn't support iterating through arrays of objects like we do here.
Hello everyone,
We are looking into this, but as a workaround, you can add a hidden internationalizedArrayString
field at the document level, and then it works in the nested structure as well.
Not the best solution but a quick fix for now.
Yep, that's what we did. Hopefully we can avoid it in the future :-)
I'm having the same problem.
In my case, there is the following document hierarchy:
document (type Foo
) -> array of objects (type Bar
) -> array of objects (type Baz
)
Objects of type Baz
have several fields of type internationalizedArrayString
, and they are not editable (same problem as OP had).
If I add a hidden field of type internationalizedArrayString
to Foo
as suggested by @selbekk and @bobinska-dev, it works.
If I do the same for Bar
only, the error still reproduces.
I briefly looked at the fix, and it seems that it can handle only the case with one level of nesting in root documents, but I may be wrong.
Is there any way to fix that without the hidden internationalizedArrayString
field workaround?
I have a document called
Menu
, and which among other fields has an array of a custommenuItem
object. In themenuItem
I have defined the title field as aninternationalizedArrayString
like so:When trying to create new or edit
menuItem
s, it is not possible to add any translations.In my
defineConfig
I have this:Any obvious reason why this is happening?