Details
-
Bug
-
Resolution: Fixed
-
High
-
5.3.8, 5.4.6
-
None
Description
After creating/editing a ContentType with an XmlText fieldType in legacy, updating the fieldtype definition through the API fails with the following exception message:
[eZ\Publish\Core\Base\Exceptions\ContentTypeFieldDefinitionValidationException] ContentType FieldDefinitions did not validate
The problem appears to be related to the tagPreset validation:
object(eZ\Publish\Core\FieldType\ValidationError)#11617 (3) { ["singular":protected]=> string(44) "Setting '%setting%' is of unknown tag preset" ["plural":protected]=> NULL ["values":protected]=> array(1) { ["setting"]=> string(9) "tagPreset" } }
Steps to reproduce:
- Create a contentType (test) with an Xml field (body)
- Update the contentType's fieldType to change the description, for example (see linked gist)
$fieldDefinition = $contentType->getFieldDefinition('body'); $updateStruct = $contentTypeService->newFieldDefinitionUpdateStruct(); $updateStruct->descriptions = array('eng-GB' => 'Body');
gist: https://gist.github.com/joaoinacio/de4492f763de8fd8441ef7e75aa8f218