Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24051

Unable to view Contents on frontend of new Content Types created via REST

    Details

      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>&lt;name&gt;</urlAliasSchema>
          <nameSchema>&lt;title&gt;</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.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Confirmed Confirmed
        14m 9s 1 rui.silva@ez.no 23/Feb/15 9:17 AM
        Confirmed Confirmed Closed Closed
        1d 6h 54m 1 rui.silva@ez.no 24/Feb/15 4:12 PM

          People

          • Assignee:
            Unassigned
            Reporter:
            Rui Silva (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: