Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-3075

AdminUI interface fails to load when a Content Type is created in the background

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • None
    • 4.2.x-dev, 4.1.5, 3.3.22
    • QA

    Description

      Note: the reproducer Command is for v4, but I've seen it happen on v3 as well.

      When a Content Type is created through the API in the background the Admin interface can fail to load with an error:

      Notice: Undefined index: ct_62b42a3dcbf14

       

      Steps to reproduce:

      1. Download the attached Command and place it in src/Command
      2. Open the browser and login as admin
      3. Go to Content -> Content Structure
      4. Run: php bin/console test:ct (and keep it running in the background)
      5. Refresh the Page in the browser

      Expected:

      Page loads without issues, with new Content Types visible

      Actual:

      Page fails to load with a PHP notice:

      [2022-06-23T08:54:22.263617+00:00] request.CRITICAL: Uncaught PHP Exception ErrorException: "Notice: Undefined index: ct_62b42a3dcbf14" at /Users/mareknocon/Desktop/Sites/v3_2/vendor/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php line 256 {"exception":"[object] (ErrorException(code: 0): Notice: Undefined index: ct_62b42a3dcbf14 at /Users/mareknocon/Desktop/Sites/v3_2/vendor/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php:256)"} []
      [2022-06-23T09:05:03.287239+00:00] request.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: "An exception has been thrown during the rendering of a template ("Notice: Undefined index: ct_62b42cbea8426")." at /Users/mareknocon/Desktop/Sites/v3_2/vendor/ibexa/admin-ui/src/bundle/Resources/views/themes/admin/content/location_view.html.twig line 31 {"exception":"[object] (Twig\\Error\\RuntimeError(code: 0): An exception has been thrown during the rendering of a template (\"Notice: Undefined index: ct_62b42cbea8426\"). at /Users/mareknocon/Desktop/Sites/v3_2/vendor/ibexa/admin-ui/src/bundle/Resources/views/themes/admin/content/location_view.html.twig:31)\n[previous exception] [object] (ErrorException(code: 0): Notice: Undefined index: ct_62b42cbea8426 at /Users/mareknocon/Desktop/Sites/v3_2/vendor/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php:256)"} []

       

      Example failure from CI:

      https://github.com/ibexa/commerce/runs/6974510605?check_suite_focus=true

          │  	[2022-06-20T22:14:31.783635+00:00] request.CRITICAL: Uncaught PHP Exception ErrorException: "Notice: Undefined index: ezkeyword" at /var/www/vendor/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php line 256 {"exception":"[object] (ErrorException(code: 0): Notice: Undefined index: ezkeyword at /var/www/vendor/symfony/form/ChoiceList/Factory/DefaultChoiceListFactory.php:256)"} [] 

      Designs

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: