Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12784

EntityReferenceTree doesn't support sibling nodes with the same name but different types

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.4.5
    • Fix Version/s: 7.4-milestone-1
    • Component/s: Model
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      The following:

      $services.model.toTree([
        $services.model.createDocumentReference('foo', 'One', 'Two'),
         $services.model.createDocumentReference('foo', ['One', 'Two'], 'Three')
      ])
      

      generates:

      [Wiki foo = [Space foo:One = [foo:One.Two = [foo:One.Two.Three]]]]
      

      because the tree doesn't support having:

      • space foo:One.Two
      • document foo:One.Two

      as sibling nodes. The tree stores the child nodes internally in a map where the key is the entity name, which is "Two" for both the space and the document in our case.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tmortagne Thomas Mortagne
                Reporter:
                mflorea Marius Dumitru Florea
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: