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

EntityReference#relativeTo() from entityReference.js doesn't handle nested spaces correctly

    XMLWordPrintable

Details

    • Unit
    • High
    • Medium
    • N/A
    • N/A

    Description

      The following JavaScript code:

      var reference = XWiki.Model.resolve('wiki:Path.To.Page', XWiki.EntityType.DOCUMENT);
      var baseReference = XWiki.Model.resolve('wiki:Path.From.Page', XWiki.EntityType.DOCUMENT);
      XWiki.Model.serialize(reference.relativeTo(baseReference))
      

      produces

      To.Page
      

      but it should output

      Path.To.Page
      

      because the space reference from the base reference is not fully matched.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: