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

Subitems list does not load after a new Content Type is created and used

    XMLWordPrintable

Details

    Description

      Ater we’ve started using GraphQL in AdminUI (to display subitems) there is an unwanted consequence - adding a new Content Type and creating a Content Item of that type breaks AdminUI (subitems do not load) until the GraphQL schema & cache are regenerated.

      That means that adding a new Content Type can no longer be performed by a site admin, but needs to be performed by a server admin (best during maintenence, to avoid clearing the cache in production when server is live).

      Steps to reproduce:

      1. Login as admin
      2. Go to Admin -> Content Types
      3. Create a new Content Type in "Content" group, with "ezstring" fieldtype
      4. Go to Content -> Content Structure
      5. Create a new item of created Content Type under root
      6. Go to root node

      Expected:

      Subitems are loaded correctly, including the new item

      Actual:

      Subitems do not load, instead the error notification is shown: " Cannot load location ".

      Error from logs:

      [2019-09-20 08:40:21] app.CRITICAL: [GraphQL] GraphQL\Error\InvariantViolation: Type loader is expected to return valid type "Folder3Content", but it returned null[0] (caught throwable) at /Users/mareknocon/Desktop/Sites/v3/vendor/webonyx/graphql-php/src/Type/Schema.php line 338. {"throwable":"[object] (GraphQL\\Error\\InvariantViolation(code: 0): Type loader is expected to return valid type \"Folder3Content\", but it returned null at /Users/mareknocon/Desktop/Sites/v3/vendor/webonyx/graphql-php/src/Type/Schema.php:338)"} []

      Note

      Subitems work correctly after GraphQL schema and cache are regenerated.

      Attachments

        Activity

          People

            Unassigned Unassigned
            marek.nocon@ibexa.co Marek Nocoń
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: