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

Terminal document can't be selected using the locationPicker macro

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 7.1.1
    • None
    • Unknown

    Description

      Even when setting 'showTerminalDocuments': 'true' when declaring a locationPicker macro, clicking on a terminal page will return the WebHome of its parent.

      See https://github.com/xwiki/xwiki-platform/blob/bc6fb452ef10414c1756b2b547e8129ec1e35c9d/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/resources/uicomponents/widgets/locationPicker.js#L282

      Note: this is only true only when the title property is not set, i.e., when the user cannot edit the page title.

      For instance:

      #locationPicker({
        'id': 'target',
        'showTerminalDocuments': 'true',
        'preview': {
          'label': 'attachment.rename.target.location.label',
          'hint': 'attachment.rename.target.location.hint'
        },
        'wiki': {
          'label': 'attachment.rename.target.wiki.label',
          'hint': 'attachment.rename.target.wiki.hint',
          'name': 'targetWikiName',
          'value': $doc.wiki ## 'xwiki'
        },
        'parent': {
          'label': 'attachment.rename.target.parent.label',
          'hint': 'attachment.rename.target.parent.hint',
          'name': 'targetSpaceName',
          'reference': $parentReference, ## 'Space'
          'placeholder': 'attachment.rename.spaceReference.placeholder'
        },
        'name': {
          'label': 'attachment.rename.target.name.label',
          'hint': 'attachment.rename.target.name.hint',
          'name': 'targetPageName', 
          'value': $name, ## 'Page'
          'placeholder': 'attachment.rename.name.placeholder'
        }
      })
      

      Attachments

        Activity

          People

            mleduc Manuel Leduc
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: