Details
-
Bug
-
Resolution: Fixed
-
Low
-
None
-
None
-
mysql, rhel
Description
A ezfloat fieldtype cannot be searchable. This is is not supported by legacy
However, if you try to craete a ezfloat fieldtype using REST as searchable it reports back as succeed, and that the field in fact are searchable. However, it is not stored as searchable in the backend
#################### - 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: 2222 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": "float", "fieldType": "ezfloat", "names": { "value": [ { "_languageCode": "eng-GB", "#text": "Float" } ] }, "descriptions": { "value": [ { "_languageCode": "eng-GB", "#text": "This is a ezfloat test" } ] }, "fieldGroup": "content", "position": "2", "isTranslatable": "true", "isRequired": "false", "isInfoCollector": "false", "isSearchable": "true" } ] } } } ##################### - Client request END - ########################## sending to target...done. Received from Target: ##################### - Target reply BEGIN - ########################## HTTP/1.1 201 Created Date: Thu, 21 Mar 2013 12:27:00 GMT Server: Apache/2.2.15 (Red Hat) X-Powered-By: PHP/5.3.3 Location: /api/ezp/v2/content/types/48 Status: 201 Created Cache-Control: no-cache Connection: close Transfer-Encoding: chunked Content-Type: application/vnd.ez.api.ContentType+json 8aa {"ContentType":{"_media-type":"application\/vnd.ez.api.ContentType+json","_href":"\/api\/ezp\/v2\/content\/types\/48","id":48,"status":"DEFINED","identifier":"TContentType","names":{"value":[{"_languageCode":"eng-GB","#text":"RESTv2DatatypeTest"}]},"descriptions":{"value":[{"_languageCode":"eng-GB","#text":"This is a description"}]},"creationDate":"2013-03-21T13:27:00+01:00","modificationDate":"2013-03-21T13:27:00+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":"2c520ef102ebcc4808583a380d71511e","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\/48\/fieldDefinitions","FieldDefinition":[{"_media-type":"application\/vnd.ez.api.FieldDefinition+json","_href":"\/api\/ezp\/v2\/content\/types\/48\/fieldDefinitions\/347","id":347,"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\/48\/fieldDefinitions\/348","id":348,"identifier":"float","fieldType":"ezfloat","fieldGroup":"content","position":2,"isTranslatable":"true","isRequired":"false","isInfoCollector":"false","defaultValue":null,"isSearchable":"true","names":{"value":[{"_languageCode":"eng-GB","#text":"Float"}]},"descriptions":{"value":[{"_languageCode":"eng-GB","#text":"This is a ezfloat test"}]},"fieldSettings":[],"validatorConfiguration":{"FloatValueValidator":{"minFloatValue":false,"maxFloatValue":false}}}]}}} ###################### - Target reply END - ###########################
As you can see in the example above, the contentfield "float" is requested to be searchable. Also, in the reply is it specified as : "isSearchable":"true"
However, when viewing the class in admin interface, it is reported as "Is not searchable" cause this is not supported
Since searchable ezfloat fieldtypes are not supported rest should either to-
- report error that the request is not accepted
- report OK, but have "isSearchable":"false" in it's reply