Details
-
Bug
-
Resolution: Fixed
-
High
-
5.1-dev
-
None
-
rhel, mysql
Description
Seems like the fieldSetting textRows is ignored by the Rest api.
No matter what you set as value, you'll get
in the reply. Also, when looking at the class in admin, the value for "Preferred number of rows:" is completely blank
Trying to create a ContentType like this:
#################### - Client request BEGIN - ######################### POST /api/ezp/v2/content/typegroups/1/types?publish=true HTTP/1.1 Host: ezpublish5.rhel61.qa.ez.local:8080 User-Agent: eZ REST QA Tester Content-Length: 2298 Authorization: Basic YWRtaW46cHVibGlzaA== Accept: application/vnd.ez.api.ContentType+json Content-type: application/vnd.ez.api.ContentTypeCreate+json { "ContentTypeCreate": { "identifier": "TContentType", "mainLanguageCode": "eng-GB", "urlAliasSchema": "<name>", "nameSchema": "<name>", "isContainer": "true", "defaultSortField": "PATH", "defaultSortOrder": "ASC", "defaultAlwaysAvailable": "true", "names": { "value": [ { "_languageCode": "eng-GB", "#text": "RESTv2DatatypeTest" } ] }, "descriptions": { "value": [ { "_languageCode": "eng-GB", "#text": "This is a description" } ] }, "FieldDefinitions": { "FieldDefinition": [ { "identifier": "name", "fieldType": "ezstring", "names": { "value": [ { "_languageCode": "eng-GB", "#text": "Name" } ] }, "descriptions": { "value": [ { "_languageCode": "eng-GB", "#text": "This is the name" } ] }, "fieldGroup": "content", "position": "1", "isTranslatable": "true", "isRequired": "true", "isInfoCollector": "false", "isSearchable": "true", "defaultValue": "New Name" } , { "identifier": "text", "fieldType": "eztext", "names": { "value": [ { "_languageCode": "eng-GB", "#text": "Text" } ] }, "descriptions": { "value": [ { "_languageCode": "eng-GB", "#text": "This is a eztext test" } ] }, "fieldGroup": "content", "position": "2", "isTranslatable": "true", "isRequired": "false", "isInfoCollector": "false", "isSearchable": "true" ,"fieldSettings": { "textRows": 10 } } ] } } } ##################### - Client request END - ########################## sending to target...done. Received from Target: ##################### - Target reply BEGIN - ########################## HTTP/1.1 201 Created Date: Thu, 21 Mar 2013 14:51:26 GMT Server: Apache/2.2.15 (Red Hat) X-Powered-By: PHP/5.3.3 Location: /api/ezp/v2/content/types/49 Status: 201 Created Cache-Control: no-cache Connection: close Transfer-Encoding: chunked Content-Type: application/vnd.ez.api.ContentType+json 872 {"ContentType":{"_media-type":"application\/vnd.ez.api.ContentType+json","_href":"\/api\/ezp\/v2\/content\/types\/49","id":49,"status":"DEFINED","identifier":"TContentType","names":{"value":[{"_languageCode":"eng-GB","#text":"RESTv2DatatypeTest"}]},"descriptions":{"value":[{"_languageCode":"eng-GB","#text":"This is a description"}]},"creationDate":"2013-03-21T15:51:27+01:00","modificationDate":"2013-03-21T15:51:27+01:00","Creator":{"_media-type":"application\/vnd.ez.api.User+json","_href":"\/api\/ezp\/v2\/user\/users\/14"},"Modifier":{"_media-type":"application\/vnd.ez.api.User+json","_href":"\/api\/ezp\/v2\/user\/users\/14"},"remoteId":"f2d366221a1a1dd23380afaf7e7c2b91","urlAliasSchema":"<name>","nameSchema":"<name>","isContainer":"true","mainLanguageCode":"eng-GB","defaultAlwaysAvailable":"true","defaultSortField":"PATH","defaultSortOrder":"ASC","FieldDefinitions":{"_media-type":"application\/vnd.ez.api.FieldDefinitionList+json","_href":"\/api\/ezp\/v2\/content\/types\/49\/fieldDefinitions","FieldDefinition":[{"_media-type":"application\/vnd.ez.api.FieldDefinition+json","_href":"\/api\/ezp\/v2\/content\/types\/49\/fieldDefinitions\/349","id":349,"identifier":"name","fieldType":"ezstring","fieldGroup":"content","position":1,"isTranslatable":"true","isRequired":"true","isInfoCollector":"false","defaultValue":"New Name","isSearchable":"true","names":{"value":[{"_languageCode":"eng-GB","#text":"Name"}]},"descriptions":{"value":[{"_languageCode":"eng-GB","#text":"This is the name"}]},"fieldSettings":[],"validatorConfiguration":{"StringLengthValidator":{"maxStringLength":0,"minStringLength":0}}},{"_media-type":"application\/vnd.ez.api.FieldDefinition+json","_href":"\/api\/ezp\/v2\/content\/types\/49\/fieldDefinitions\/350","id":350,"identifier":"text","fieldType":"eztext","fieldGroup":"content","position":2,"isTranslatable":"true","isRequired":"false","isInfoCollector":"false","defaultValue":null,"isSearchable":"true","names":{"value":[{"_languageCode":"eng-GB","#text":"Text"}]},"descriptions":{"value":[{"_languageCode":"eng-GB","#text":"This is a eztext test"}]},"fieldSettings":{"textRows":null},"validatorConfiguration":[]}]}}} 0
Attachments
Issue Links
- relates to
-
EZP-20722 eZRest v2: Default values for FieldSettings not set when creating contenttypes
- Closed