pimcore: updating objects with localized fields

1k Views Asked by At

I have a weird problem when updating objects in pimcore. I've created a class containing some normal and also localized fields and then some objects from that class. It is possible to edit all objects directly via pimcore, but the only ones which can be updated through controllers are the ones where all localized fields are filled, although some of these fields may not be used in the form. That is, an object won't be updated unless all its localized fields are filled before.

Any hints?

EDITED:

Here is a piece of code from my controller :

$newTitle = Object_TitleArchive::getById(251);
$newTitle->setName('New Name'); 
$newTitle->save();

It does not work unless all localized fields of the object are filled before or given now.

Revision: 3086

1

There are 1 best solutions below

0
On

Check under Settings -> Object -> Classes, and then under the class you have defined. If the components placed under the localized field has the checkbox Mandatory Field checked, remove that check or fill in values for all required languages.