There are 4 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-ae1f78e9-f67c-4d48-a086-3f1ee66575c6 XWIKI-24007 Open

Macro returning a MacroBlock is not displayed by the BlockAsyncRenderer

 
View issue   ยท   Add comment
 

4 comments

 
cid:jira-generated-image-avatar-bbdc1e1a-3f13-4880-a93a-a3ebaa0322c6 Thomas Mortagne on 12/Feb/26 15:19
 

Note that the use case you have in your reproduction steps does not have anything to do with your title. This is not a "macro returning a MacroBlock", this is a macro executing asynchronous content.

But the problem is that your custom TestAsyncRenderer#execute does not really execute anything (as in transformations), so your final result is a MacroBlock (which is ignored by the HTML renderer).

 
cid:jira-generated-image-avatar-bbdc1e1a-3f13-4880-a93a-a3ebaa0322c6 Thomas Mortagne on 12/Feb/26 15:20
 
Note that the use case you have in your reproduction steps does not have anything to do with your title. This is not a "macro returning a MacroBlock", this is a macro executing asynchronous content.

But the problem is that your custom {{TestAsyncRenderer#execute}} does not really execute anything (as in transformations), so your final result is a {{MacroBlock}} (which is ignored by the HTML renderer).
You might want to take a look at DefaultBlockAsyncRenderer, to see an example of a proper implementation of BlockAsyncRenderer.
 
cid:jira-generated-image-avatar-bbdc1e1a-3f13-4880-a93a-a3ebaa0322c6 Thomas Mortagne on 12/Feb/26 15:22
 
Note that the use case you have in your reproduction steps does not have anything to do with your title. This is not a "macro returning a MacroBlock", this is a macro executing asynchronous content.

But the problem is that your custom {{TestAsyncRenderer#execute}} does not really execute anything (as in transformations), so your final result is a {{MacroBlock}} (which is ignored by the HTML renderer). You might want to take a look at DefaultBlockAsyncRenderer, to see an example of a proper implementation of BlockAsyncRenderer.


The following (which does match the title) works fine, for example:

{{async}}
{{info}}
{{box}}
box content
{{/box}}
{{/info}}
{{/async}}
 
cid:jira-generated-image-avatar-bbdc1e1a-3f13-4880-a93a-a3ebaa0322c6 Thomas Mortagne on 12/Feb/26 15:22
 
Note that the use case you have in your reproduction steps does not have anything to do with your title. This is not a "macro returning a MacroBlock", this is a macro executing asynchronous content.

But the problem is that your custom {{TestAsyncRenderer#execute}} does not really execute anything (as in transformations), so your final result is a {{MacroBlock}} (which is ignored by the HTML renderer). You might want to take a look at DefaultBlockAsyncRenderer, to see an example of a proper implementation of BlockAsyncRenderer.

The following (which does match the title) works fine, for example:

{
noformat}
{ { async}}
{{info}}
{{box}}
box content
{{/box}}
{{/info}}
{{/async}}

{noformat}