Details
-
Bug
-
Resolution: Invalid
-
High
-
None
-
None
Description
I tried creating several content types via REST, using session-based authentication, on REST Client.
For one in specific (the simplest I could think of), I used the following REST parameters:
Method: POST URL: http://ezp5.dev.vagrant/api/ezp/v2/content/typegroups/3/types?publish=true Headers: Accept: application/vnd.ez.api.ContentType Content-Type: application/vnd.ez.api.ContentTypeCreate
Body: <?xml version="1.0" encoding="UTF-8"?> <ContentTypeCreate> <identifier>rest_dummy</identifier> <names> <value languageCode="eng-GB">Rest Dummy</value> </names> <descriptions> <value languageCode="eng-GB">dummy rest-created content type</value> </descriptions> <remoteId>remoteId-qwert550</remoteId> <urlAliasSchema><name></urlAliasSchema> <nameSchema><title></nameSchema> <isContainer>false</isContainer> <mainLanguageCode>eng-GB</mainLanguageCode> <defaultAlwaysAvailable>true</defaultAlwaysAvailable> <defaultSortField>PATH</defaultSortField> <defaultSortOrder>ASC</defaultSortOrder> <FieldDefinitions> <FieldDefinition> <identifier>name</identifier> <fieldType>ezstring</fieldType> <fieldGroup>content</fieldGroup> <position>10</position> <isTranslatable>true</isTranslatable> <isRequired>false</isRequired> <isInfoCollector>false</isInfoCollector> <defaultValue></defaultValue> <isSearchable>true</isSearchable> <names> <value languageCode="eng-GB">Name</value> </names> <descriptions> <value languageCode="eng-GB">This is the title</value> </descriptions> </FieldDefinition> </FieldDefinitions> </ContentTypeCreate>
I noticed then that the content type was successfully created (in this case, inside default 'Media' Content Type Group).
However I found out that even though I can create contents of this new Content Type, I cannot see them on frontend.
Since now Legacy is gone on master, the only method we can create new Content Types is via REST or the Public API, AFAIK.