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

Add support for nested spaces in FAQs

    XMLWordPrintable

Details

    • Integration
    • Unknown
    • N/A

    Description

      We should be able to create a new FAQ by adding a FAQHomeClass object on the WebHome of a new space.

      However, it should not work.

      Example of breaking code:

      #set ($newFAQReference = $services.model.createDocumentReference('', "${faqSpace}", "$question"))
      

      (in https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-faq/xwiki-platform-faq-ui/src/main/resources/FAQCode/FAQHomeSheet.xml#L57-57)
      where $faqSpace is $doc.space.

      If $doc.space is "Space1.Space2", the new FAQ entry will be located in a space called "Space1.Space2" instead of being in the Space2 which is itself in the Space1.

      Must be replaced by:

       $services.model.resolveDocument($question)
      

      But there might be other problems in the code.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            gdelhumeau Guillaume Delhumeau
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h