|
| Description: |
A template that allows asynchronous rendering (with the {{##!asyncAllowed=true}} header) is never displayed when it is rendered asynchronously: the HTML placeholder that should be replaced by the template content once it is ready is malformed, so the content is never loaded.
h2. Steps to reproduce
# Create the file {{templates/asynctest.vm}} in the XWiki web application (e.g. {{webapps/xwiki/templates/asynctest.vm}} in the Jetty/HSQLDB distribution) with the following content: {code} ##!asyncAllowed=true <p id="asyncTestContent">Asynchronous template content</p> {code} # Open {{/xwiki/bin/view/Main/? xpage viewer =asynctest}} in the browser.
h2. Expected result
The text "Asynchronous template content" is displayed, either directly or after it has been loaded asynchronously.
h2. Actual result
The text page is never displayed but the text never appears . The response HTML of the page contains a broken placeholder where the attributes are not separated, not quoted and the tag is self-closing: {code} <div class=xwiki-asyncdata-xwiki-async-id=template/environment%253A%252Ftemplates%252Fasynctest.vm/html%252F5.0/false/author/xwiki%253AXWiki.superadmin/secureDocument/null/RYULT8tS1data-xwiki-async-client-id=RYULT8tS1/> {code} Since the element doesn't have the {{xwiki-async}} class, the content is never fetched. Opening {{/xwiki/bin/view/Main/? xpage viewer =asynctest&async=false}} displays the content as expected. |
|