Details
-
Bug
-
Resolution: Duplicate
-
High
-
5.0.0-dev
-
None
-
None
Description
As subject says, field identifier and names[] is wiped out when calling $contentTypeService->newFieldDefinitionUpdateStruct()
$titleUpdateStruct = $contentTypeService->newFieldDefinitionUpdateStruct(); $titleFieldDefinition = $contentTypeDraft->getFieldDefinition( 'title' ); $titleUpdateStruct->descriptions = array( $this->api->lang => 'Title of the blog post UPDATED', ); $contentTypeService->updateFieldDefinition( $contentTypeDraft, $titleFieldDefinition ,$titleUpdateStruct );
The description is updated, all right....
However, values for name and idenifier is wiped out when the updated content
type is published..
As a workaround, I have to add this before updateFieldDefinition()
in order to make it work:
$titleUpdateStruct->names = array( $this->api->lang => 'Title', ); $titleUpdateStruct->identifier = 'title';
Attachments
Issue Links
- duplicates
-
EZP-19651 publicAPI : Field identifier and names[] is wiped out when calling $contentTypeService->newFieldDefinitionUpdateStruct()
- Closed