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

The BlockNote link modal creates links with absolute references

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 18.10.0-rc-1
    • 18.9.0
    • BlockNote
    • None
    • Integration
    • Unknown

    Description

      Steps to reproduce

      1. Edit the page Space.Page with the BlockNote editor.
      2. Insert a link to the sibling page Space.Other, or to an attachment of the edited page, picking it from the link modal suggestions.
      3. Save and look at the wiki syntax.

      Expected

      The link references are relative to the edited page, like the WYSIWYG editors and the BlockNote image quick action produce them: [[Other>>doc:Other]], [[cat.png>>attach:cat.png]]. This way the links keep working when the page is renamed or copied, and the wiki is left out when the target is in the same wiki.

      Actual

      The links have absolute references, including the wiki: [[Other>>doc:xwiki:Space.Other]], [[cat.png>>attach:xwiki:Space.Page@cat.png]].

      When editing back a link, its reference also shows up in the link target field with its resource type prefix (e.g. doc:xwiki:Space.Other).

      Cause

      The link modal doesn't know which document holds the link, so it can neither serialize the selected reference relative to it nor resolve a relative reference (e.g. cat.png is resolved to an attachment without a page).

      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: