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

Cannot Create ContentType with Multiple Fields

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 1.11.0
    • Fix Version/s: 1.11.1
    • Labels:
      None
    • Environment:

      Multiple environments, including eZ's internal test servers (Debian) and external tests on Ubuntu 16.04

      Description

      Attempting to create a ContentType with more than one Field Definition fails under certain conditions, one of which is described below:

      • Create a custom ContentType Group (e.g. "Tutorials")
      • Within that ContentType Group, create a ContentType (e.g. "Tutorial")
      • Check the "Container" option on the ContentType, and add a Field Definition (e.g. Text line: "Title", required)
      • Attempt to add a second Field Definition (e.g. Selection: "Skill Level", 3 options: "Beginner", "Intermediate", "Advanced", required)
      • Try to "OK" or "Apply"

      Result: Red error bar at bottom of Admin UI: "Failed to load 'http://example.site.tld/pjax/contenttype/update/##/eng-GB'" where ## is the id of the ContentType. Developer tools show on the console: "Failed to load resource: the server responded with a status of 500 (Internal Server Error)"

      Form Data:

      ezrepoforms_contenttype_update[saveContentType]:
      ezrepoforms_contenttype_update[name]:Tutorial
      ezrepoforms_contenttype_update[identifier]:tutorial
      ezrepoforms_contenttype_update[description]:A Tutorial
      ezrepoforms_contenttype_update[nameSchema]:<title>
      ezrepoforms_contenttype_update[urlAliasSchema]:
      ezrepoforms_contenttype_update[defaultSortField]:2
      ezrepoforms_contenttype_update[defaultSortOrder]:0
      ezrepoforms_contenttype_update[defaultAlwaysAvailable]:1
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][position]:1
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][name]:Title
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][identifier]:title
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][description]:The title of the tutorial
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][isRequired]:1
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][isSearchable]:1
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][isTranslatable]:1
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][fieldGroup]:content
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][minLength]:1
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][maxLength]:
      ezrepoforms_contenttype_update[fieldDefinitionsData][0][defaultValue]:
      ezrepoforms_contenttype_update[fieldTypeSelection]:ezauthor

      Log entry from prod:

      request.CRITICAL: Uncaught PHP Exception
      eZ\Publish\API\Repository\Exceptions\PropertyNotFoundException:
      "Property 'field' not found on class 'EzSystems\RepositoryForms\Data\FieldDefinitionData'"
      at /var/www/ezplatform/vendor/ezsystems/ezpublish-kernel/eZ/Publish/API/Repository/Values/ValueObject.php
      line 101

      {"exception":"[object] (eZ\\Publish\\API\\Repository\\Exceptions\\PropertyNotFoundException(code: 0): Property 'field' not found on class 'EzSystems\\RepositoryForms\\Data\\FieldDefinitionData' at var/www/ezplatform/vendor/ezsystems/ezpublish-kernel/eZ/Publish/API/Repository/Values/ValueObject.php:101)"}

      []

      Seen also in Community Slack as well: https://ezcommunity.slack.com/archives/C06BF1CLB/p1505994530000263

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            david.liedle-obsolete@ez.no David Christian Liedle (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: