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

Unable to edit translated Content Type migrated from Legacy to v2

    XMLWordPrintable

    Details

      Description

      While we don't support translating Content Types in the new Admin UI yet, saving these migrated from Legacy should at least be possible.

      Steps to reproduce:

      1. Install eZ Platform clean
      2. Add via Admin UI another language: pol-PL
      3. Create using PAPI new Content Type in a pol-PL language:
                $contentTypeGroup = $contentTypeService->loadContentTypeGroupByIdentifier('Content');
        
                $contentTypeStruct = $this->contentTypeService->newContentTypeCreateStruct('test_t');
                $contentTypeStruct->mainLanguageCode = 'pol-PL';
                $contentTypeStruct->names = ['pol-PL' => 'PL Test'];
        
                $fieldDefinitionCreateStruct = $contentTypeService->newFieldDefinitionCreateStruct('name', 'ezstring');
                $fieldDefinitionCreateStruct->position = 1;
                $fieldDefinitionCreateStruct->names = ['pol-PL' => 'Name'];
                $contentTypeStruct->addFieldDefinition($fieldDefinitionCreateStruct);
        
                $contentTypeDraft = $contentTypeService->createContentType($contentTypeStruct, [$contentTypeGroup]);
        
                $contentTypeService->publishContentTypeDraft($contentTypeDraft);
        
      4. Try to edit that Content Type in Admin UI
      5. Observe that both Content Type and Field Def names are empty.
      6. Fill-in empty names.
      7. Save Content Type.
      8. Observe either HTTP 500 error in prod mode or "Notice: undefined index pol-PL" in dev mode.

      Expected result

      It should be possible to save Content Type without error.

      Workaround

      It's worth to notice that the error comes from the other language (pol-PL) not being present in the prioritized languages list of admin SiteAccess. Once it gets added, the issue disappears.

      However I don't think that not having a language in the list should be a blocker for saving Content Type.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andrzej.longosz@ez.no Andrzej Longosz
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: