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

[Public API] As a developer I want required field name on create content type exception to be clear

    Details

      Description

      When creating a content type, if no name is specified the exception error is unclear:

      1) eZ\Publish\API\Repository\Tests\ContentTypeServiceTest::testContentTypeCreateStructAddFieldDefinitionThrowsBadStateExceptionNonRepeatableField
       
      Argument 1 passed to eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator::generateLanguageMask() must be an array, null given, called in /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/Gateway/EzcDatabase.php on line 398 and defined
       
      /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Language/MaskGenerator.php:43
      /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/Gateway/EzcDatabase.php:398
      /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/Gateway/EzcDatabase.php:342
      /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php:264
      /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/Handler.php:292
      /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/Handler.php:259
      /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Persistence/Legacy/Content/Type/MemoryCachingHandler.php:221
      /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/Repository/ContentTypeService.php:593
      /var/www/html/integration/vendor/ezsystems/ezpublish-kernel/eZ/Publish/API/Repository/Tests/ContentTypeServiceTest.php:1486
      

      From my POV it should mention the attribute "names" can't be empty or something similar

        Issue Links

          Activity

          Hide
          Marcos Loureiro (Inactive) added a comment -

          Closed issue as duplicated

          Show
          Marcos Loureiro (Inactive) added a comment - Closed issue as duplicated

            People

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

              Dates

              • Created:
                Updated:
                Resolved: