Details
-
Improvement
-
Resolution: Fixed
-
Major
-
7.1.1
-
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.