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

Duplicate column UDW when using both "rootLocationId" and "startingLocationId"

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 4.4.4, 4.5.1
    • 4.4.3
    • None
    • None
    • Yes

    Description

      When UDW is configured to use both rootLocationId and startingLocationId column with the default location will be duplicated in UDW view.

      Steps to reproduce
      1. Ibexa DXP v4.4+
      2. Create a new configuration for UDW (Location 43 is "Media", and Location 51 is "Images"):

          system:
              default:
                  universal_discovery_widget_module:
                      configuration:
                          test_udw:
                              multiple: false
                              rootLocationId: 43
                              startingLocationId: 51
      

      3. Create a Custom Tab in the Dashboard for the "Common content" section:

      src/Tab/Dashboard/Everyone/TestTab.php

      <?php
      
      namespace App\Tab\Dashboard\Everyone;
      
      use Ibexa\Contracts\AdminUi\Tab\AbstractTab;
      use Symfony\Contracts\Translation\TranslatorInterface;
      use Twig\Environment;
      
      final class TestTab extends AbstractTab
      {
          public function __construct(Environment $twig, TranslatorInterface $translator)
          {
              parent::__construct($twig, $translator);
          }
      
          public function getIdentifier(): string
          {
              return 'test';
          }
      
          public function getName(): string
          {
              return 'Test Tab';
          }
      
          public function renderView(array $parameters): string
          {
              return $this->twig->render('tab/test.html.twig');
          }
      }
      

      templates/tab/test.html.twig

      <button
          class="btn ibexa-btn ibexa-btn--primary ibexa-btn--cotf-create"
          data-udw-config="{{ ibexa_udw_config('test_udw')}}"
      >
          UDW
      </button>
      

      config/services.yaml

      services:
          App\Tab\Dashboard\Everyone\TestTab:
              autowire: true
              autoconfigure: true
              public: false
              tags:
                  - { name: ibexa.admin_ui.tab, group: dashboard-everyone }
      

      config/packages/ibexa.yaml

           system:
              default:
                  universal_discovery_widget_module:
                      configuration:
                          test_udw:
                              multiple: false
                              rootLocationId: 43
                              startingLocationId: 51

      4. Go to Dashboard->Common content->Test tab
      5. Click on the "UDW" button

      Result:

      UDW will be displayed and the first column will be duplicated

      Expected result:

      UDW will be displayed normally.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              mateusz.bieniek@ibexa.co Mateusz Bieniek
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: