This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-7e5c293d-d7a9-49a6-8860-fbe06c76e569 XWIKI-24578 Open

Macro editor fails to render parameter modal when a macro parameter uses a List<String> type with a non-empty default value and has a custom picker that uses  select-multiple

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-0f366511-c899-4c62-9068-7df24742c617 Farcasi Alexandru-Vicentiu created this issue on 20/Jul/26 20:54
 
Summary: Macro editor fails to render parameter modal when a macro parameter uses a List<String> type with a non-empty default value and has a custom picker that uses  select-multiple
Issue Type: cid:jira-generated-image-avatar-7e5c293d-d7a9-49a6-8860-fbe06c76e569 Bug
Affects Versions: 15.0-rc-1, 15.10.16, 16.10.18, 17.10.10, 18.5.0
Assignee: Unassigned
Components: WYSIWYG Editor
Created: 20/Jul/26 20:54
Priority: cid:jira-generated-image-static-major-33be6003-45cc-4e24-98cc-637b0b476523 Major
Reporter: Farcasi Alexandru-Vicentiu
Description:

The Macro Editor fails to render the parameter modal when a macro parameter uses a List<String> type with a non-empty default value and has a custom picker that uses select-multiple. This occurs because, in some cases, the serialized XML does not contain a value for the parameter, so the parameter's default value is used instead. In this case, the default value is an array, and attempting to call split on an array causes an error, which breaks the UI.

Steps to reproduce:
1. Define a java macro with a parameter that uses a List<String> as the type and has a default value
2. Add a custom multi picker.
3. Add the macro in the page

 
 

2 updates

 
cid:jira-generated-image-avatar-0f366511-c899-4c62-9068-7df24742c617 Changes by Farcasi Alexandru-Vicentiu on 20/Jul/26 20:54
 
Description: The Macro Editor fails to render the parameter modal when a macro parameter uses a List<String> type with a non-empty default value and has a custom picker that uses select-multiple. This occurs because, in some cases, the serialized XML does not contain a value for the parameter, so the parameter's default value is used instead. In this case, the default value is an array, and attempting to call split on an array causes an error, which breaks the UI.

Steps to reproduce:
1. Define a java macro with a parameter that uses a List<String> as the type and has a default value
2. Add a custom multi picker.
3. Add the macro in the page

EXPECTED RESULTS: The modal is rendered and I can edit my parameters

ACTUAL RESULTS: The modal shows an error.
Assignee: Farcasi Alexandru-Vicentiu