There are 3 updates, 1 comment.
 
 
Book Versions / cid:jira-generated-image-avatar-48a33446-cc1e-4dd5-9840-a98ff50cb18e BVERSION-114 Open

Wiki macros do not display content

 
View issue   ยท   Add comment
 

3 updates

 
cid:jira-generated-image-avatar-d75fca04-f056-455f-a164-e97ded6adfdf Changes by Raluca Stavro on 27/Jan/25 17:07
 
Component: Base feature
Priority: Minor Major
Labels: priority
 
 

1 comment

 
cid:jira-generated-image-avatar-d75fca04-f056-455f-a164-e97ded6adfdf Raluca Stavro on 27/Jan/25 17:07
 
This is https://jira.xwiki.org/browse/XWIKI-18965 .

It is related to the fact that these macros have parameters using custom displayers (ex : the *language* paramer in the Content Translation macro) and we're checking for the parameter values in order to make decisions about what to display in the page (ex: decide to display the content of the macro if the *language* in the parameter matches the selected language), when the macro is loaded. These custom displayers have custom convertors that are components and because the wiki macro is not reloaded when the classloader is reloaded and the old class referencing is kept, then the macro parameter value can't be converted to its type, therefore the value will be null, so the decisions made in the macro content will not be valid -> the expected content is not displayed.

All this happens after upgrading the extension.

The fix for ttps://jira.xwiki.org/browse/XWIKI-18965 is complex, so we should consider the following workarounds :
# Restart the instance *OR*
# Re-save all the wiki macros having parameters using custom displayers *OR*
# Avoid using conversion from String to the custom type, by replacing :

*
** {color:#1b1d22}$!wikimacro.parameters._paramName_{color} with
** {color:#1b1d22}$!xcontext.macro.params._paramName_{color}