Details
-
Bug
-
Resolution: Fixed
-
High
-
5.2-dev
-
Server OS: CentOS 6.4
PHP: 5.3.3
Database: MySQL 5.1.69
Browser: Firefox 20.0
Interface: [Admin Interface]
Description
The only value accepted to the DateTime fieldtype when create a content was a timestamp.
However this was not filled.
Steps to Reproduce:
( on admin interface ) 1 - create a content type - Attribute 1 - Type: "ezstring" - Attribute 1 - Name: "Name" - Attribute 1 - Identifier: "name" - Attribute 2 - Type: "ezdatetime" - Attribute 2 - Name: "DateTime" - Attribute 2 - Identifier: "datetime" ( on a REST client ) 1 - Send request: POST /api/ezp/v2/content/objects Accept: application/vnd.ez.api.Content+json Authentication: ( log as admin ) Content-Type: application/vnd.ez.api.ContentCreate+xml Body: ( XML bellow ) 2 - Verify that on the response the current value of field DateTime is "0" ( response is also bellow )
Request body:
<ContentCreate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ContentType href="/api/ezp/v2/content/types/48"/> <mainLanguageCode>eng-GB</mainLanguageCode> <LocationCreate> <ParentLocation href="/api/ezp/v2/content/locations/1/2" /> <priority>0</priority> <hidden>false</hidden> <sortField>PATH</sortField> <sortOrder>ASC</sortOrder> </LocationCreate> <Section href="/api/ezp/v2/content/sections/1"/> <alwaysAvailable>true</alwaysAvailable> <fields> <field> <fieldDefinitionIdentifier>name</fieldDefinitionIdentifier> <languageCode>eng-GB</languageCode> <fieldValue>Test</fieldValue> </field> <field> <fieldDefinitionIdentifier>datetime</fieldDefinitionIdentifier> <fieldValue>1376910190</fieldValue> </field> </fields> </ContentCreate>
Response:
{ "Content": { "_media-type": "application/vnd.ez.api.Content+json", "_href": "/api/ezp/v2/content/objects/62", "_remoteId": "827490b145a386234493eed3180c7880", "_id": "62", "ContentType": { "_media-type": "application/vnd.ez.api.ContentType+json", "_href": "/api/ezp/v2/content/types/48" }, "Name": "Test", "Versions": { "_media-type": "application/vnd.ez.api.VersionList+json", "_href": "/api/ezp/v2/content/objects/62/versions" }, "CurrentVersion": { "_media-type": "application/vnd.ez.api.Version+json", "_href": "/api/ezp/v2/content/objects/62/currentversion", "Version": { "_media-type": "application/vnd.ez.api.Version+json", "_href": "/api/ezp/v2/content/objects/62/versions/1", "VersionInfo": { "id": "511", "versionNo": 1, "status": "DRAFT", "modificationDate": "2013-08-19T12:46:06+02:00", "Creator": { "_media-type": "application/vnd.ez.api.User+json", "_href": "/api/ezp/v2/user/users/14" }, "creationDate": "2013-08-19T12:46:06+02:00", "initialLanguageCode": "eng-GB", "languageCodes": "eng-GB", "names": { "value": [ { "_languageCode": "eng-GB", "#text": "Test" } ] }, "Content": { "_media-type": "application/vnd.ez.api.ContentInfo+json", "_href": "/api/ezp/v2/content/objects/62" } }, "Fields": { "field": [ { "id": "233", "fieldDefinitionIdentifier": "name", "languageCode": "eng-GB", "fieldValue": "Test" }, { "id": "234", "fieldDefinitionIdentifier": "datetime", "languageCode": "eng-GB", "fieldValue": { "timestamp": 0, "rfc850": "Thursday, 01-Jan-70 00:00:00 GMT+0000" } } ] }, "Relations": { "_media-type": "application/vnd.ez.api.RelationList+json", "_href": "/api/ezp/v2/content/objects/62/versions/1/relations", "Relation": [ ] } } }, "Section": { "_media-type": "application/vnd.ez.api.Section+json", "_href": "/api/ezp/v2/content/sections/1" }, "Locations": { "_media-type": "application/vnd.ez.api.LocationList+json", "_href": "/api/ezp/v2/content/objects/62/locations" }, "Owner": { "_media-type": "application/vnd.ez.api.User+json", "_href": "/api/ezp/v2/user/users/14" }, "mainLanguageCode": "eng-GB", "alwaysAvailable": "true" } }
Attachments
Issue Links
- discovered while testing
-
EZP-21351 Core compiler passes don't allow one service to use same tag with varying attributes
- Closed