Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6411

When displaying a link field, the combobox is always querying the dataset size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.6
    • None
    • None

      Steps to reproduce

      • Log tools (you may hit LOGTOOLS-21, that is unrelated), change to debug: info.magnolia.dam.jcr.JcrAssetProvider
      • Pages app: create a new page using basic template
      • Include a text and image component
      • Change to Image tab
      • Check the logs
        2020-11-17 16:56:18,419 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Running SQL2 query 'SELECT * FROM [nt:base] AS asset WHERE (NOT asset.[mgnl:deleted] IS NOT NULL) AND asset.[jcr:primaryType] = 'mgnl:asset'' against workspace dam.
        2020-11-17 16:56:18,433 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/11219108004_604a12df22_o.jpeg'
        2020-11-17 16:56:18,435 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/11219108435_a41740babe_o.jpeg'
        2020-11-17 16:56:18,436 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/14518293372_77d06a17fb_o.png'
        2020-11-17 16:56:18,436 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/31261019086_f4438ae8aa_o.jpeg'
        2020-11-17 16:56:18,436 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/IMG-20170622-WA0006.jpg'
        2020-11-17 16:56:18,436 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/IMG_0822.jpeg'
        2020-11-17 16:56:18,436 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/team-bike.png'
        2020-11-17 16:56:18,436 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/secret-santa-2016_31180868041_o.jpeg'
        2020-11-17 16:56:18,436 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/dinner.jpeg'
        2020-11-17 16:56:18,437 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Running SQL2 query 'SELECT * FROM [nt:base] AS asset WHERE (NOT asset.[mgnl:deleted] IS NOT NULL) AND asset.[jcr:primaryType] = 'mgnl:asset'' against workspace dam.
        2020-11-17 16:56:18,439 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/11219108004_604a12df22_o.jpeg'
        2020-11-17 16:56:18,439 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/11219108435_a41740babe_o.jpeg'
        2020-11-17 16:56:18,440 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/14518293372_77d06a17fb_o.png'
        2020-11-17 16:56:18,440 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/31261019086_f4438ae8aa_o.jpeg'
        2020-11-17 16:56:18,440 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/IMG-20170622-WA0006.jpg'
        2020-11-17 16:56:18,440 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/IMG_0822.jpeg'
        2020-11-17 16:56:18,440 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/team-bike.png'
        2020-11-17 16:56:18,440 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/secret-santa-2016_31180868041_o.jpeg'
        2020-11-17 16:56:18,440 DEBUG info.magnolia.dam.jcr.JcrAssetProvider      : Created asset linked to the following node '/untitled/dinner.jpeg'
        

      Expected result

      Not querying the whole workspace when generating the dialog

      Current result

      A query is done to get dataset size.

      Development notes

      If you include a breakpoint in info.magnolia.dam.jcr.JcrAssetProvider.list(AssetQuery), you can see the following stack:

      Currently, linkField uses a combobox to display the item path (used to be a textfield) and the combobox may cause troubles due to since it might not be using the lazy loading. It might be usefull to replace combobox solution with something simpler and less intrusive.
      Vaadin combobox will try to get the dataset size even if paging is enabled

        Acceptance criteria

              sdemocko Šimon Demočko
              miruela Mercedes Iruela
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 53m
                    53m