Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Confluence Macro: Adding additional parameter is not getting reflected

Yagnesh Bhat
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2021

I have a custom confluence macro developed as a part of the plugin. So far, we've had that macro accept one parameter. Now we added a second parameter from the atlassian-plugin.xml like so:

<parameter name="newParam" required="true">
<option key="showNameInPlaceholder" value="false"/>
<option key="showValueInPlaceholder" value="false"/>
</parameter>

The problem is inspite of adding this in the atlassian-plugin.xml and after refreshing my local dev environment, the storage format doesnt seem to get updated in either edit mode or view mode of the macro inspite of adding something as direct as  

params.put("newParam", 12345);

as a first line in the body of the below execute methods in the macro code

public String execute(Map<String, String> parameters, String body, ConversionContext conversionContext) throws MacroExecutionException
public String execute(final Map params, final String body, final RenderContext renderContext) throws MacroException 

 Please advise if there is anything I am missing or if there is anything I can troubleshoot. At the end we just want to make sure that this macro is able to accept his new parameter for all the older usages as well as any new usages.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events