I’m trying to programmatically translate content of a page. I’ve set some fields to “translate: false” so that they cannot be changed in the panel.
I’m now trying to update Structure Fields of a page with a new data array. But this data array does not have all the fields. Only some.
Problem: When using $page→update($content, $language)
and passing an incomplete $content
array, e.g. where some nested fields (Structure) are missing, those excluded fields become empty in the translation.
Is this intended? Is the $page→update() not patching content recursively, but rather replaces entries of a structure?