There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-71732dc3-b43a-41c0-ba59-cc4782307bb9 XWIKI-25178 Open

Templates allowing asynchronous rendering are never displayed because of a malformed placeholder

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-6ca71b88-1a02-4b06-8c28-e6a745dc0ffc Changes by Michael Hamann on 05/Oct/26 17:44
 
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.