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

Navigation menu is showing the XWiki space by default in subwikis when using a template

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 10.5-rc-1, 9.11.6
    • 9.11.5
    • Index
    • None
    • Unknown
    • N/A
    • N/A

    Description

      To reproduce:

      • Create a subwiki template, and after it's created mark it as a template. Then verify that the Nav panel only shows Home
      • Now create another subwki based on this template

      Notice that the Nav panel now show XWiki > XWiki Syntax Guide when it shouldn't.

      Attachments

        Issue Links

          Activity

            [XWIKI-15326] Navigation menu is showing the XWiki space by default in subwikis when using a template

            This index is not used during upgrade but it's an issue for edit/move/delete protection. Will need to debug this, I tough there was unit tests for this.

            tmortagne Thomas Mortagne added a comment - This index is not used during upgrade but it's an issue for edit/move/delete protection. Will need to debug this, I tough there was unit tests for this.

            The problem is with this code:

            #set ($documentReference = $services.model.createDocumentReference('templateWiki', 'Menu', 'WebHome'))
            $services.extension.xar.getInstalledExtensions($documentReference)
            
            #set ($documentReference = $services.model.createDocumentReference('wikiCreatedFromTemplate', 'Menu', 'WebHome'))
            $services.extension.xar.getInstalledExtensions($documentReference)
            

            You get

            [org.xwiki.platform:xwiki-platform-menu-ui/10.4]
            []
            

            So there is a problem with the extension index for XAR extensions: the extension appears as installed in the Extension Manager UI but EM doesn't know which pages belong to the extension. Besides the Navigation Panel, this can create serious problems when upgrading such a wiki created from a template.

            tmortagne WDYT?

            mflorea Marius Dumitru Florea added a comment - The problem is with this code: #set ($documentReference = $services.model.createDocumentReference('templateWiki', 'Menu', 'WebHome')) $services.extension.xar.getInstalledExtensions($documentReference) #set ($documentReference = $services.model.createDocumentReference('wikiCreatedFromTemplate', 'Menu', 'WebHome')) $services.extension.xar.getInstalledExtensions($documentReference) You get [org.xwiki.platform:xwiki-platform-menu-ui/10.4] [] So there is a problem with the extension index for XAR extensions: the extension appears as installed in the Extension Manager UI but EM doesn't know which pages belong to the extension. Besides the Navigation Panel, this can create serious problems when upgrading such a wiki created from a template. tmortagne WDYT?
            vmassol Vincent Massol added a comment -

            Note: I installed the menu app and created a menu entry in the template wiki but I don't think it's related

            vmassol Vincent Massol added a comment - Note: I installed the menu app and created a menu entry in the template wiki but I don't think it's related

            People

              tmortagne Thomas Mortagne
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: