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

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

    Details

    • Tests:
      Unit
    • Development Priority:
      High
    • Difficulty:
      Medium
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: