Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.0
-
None
Description
When the code macro result is computed asynchronously (the default, codecached.async=true), a link to a missing page in the title parameter points to the right page creation URL but with parent=Main.WebHome instead of the page containing the macro. So, the first time the page is displayed (before the result is cached), a page created from that link gets Main.WebHome as parent.
Steps to reproduce
- Create a page Sandbox.Test with the following content:
{{code title="See [[Child]]" language="none"}}some content{{/code}} - View the page (first view, the macro is rendered asynchronously)
Result
The link points to /xwiki/bin/create/Sandbox/Test/Child/WebHome?parent=Main.WebHome
Expected
The link points to /xwiki/bin/create/Sandbox/Test/Child/WebHome?parent=Sandbox.Test.WebHome, as it does once the result is cached.
The reason is that the parent parameter is computed from the context document, and the asynchronous job is executed without any context document. CODECACHE-5 fixed the link target itself.
Attachments
Issue Links
- relates to
-
CODECACHE-5 Relative links and images in the title and image parameters point to Main.WebHome when the code macro is rendered asynchronously
-
- Closed
-