After creating a macro (plugin) for confluence, I want to have the ability to edit it. When I click on edit page then edit on the macro, I get the error message:
"No Macro Metadata
There is no metadata configured for this macro which means no configuration screen can be presented here.
If this is a user macro then you can add metadata to the template using the User Macro Administration console."
How do I go about configuring metadata for my plugin?
Hello @Aviral Gupta
Welcome to the community.
What instructional documents did you use to guide you in creation of your macro/plugin? Can you provide a link to them?
I have not created a custom macro nor a plugin for Confluence Cloud before, but I found a few different reference documents when I was searching. It would be helpful to know which one you used.
I used the link above as a starting point and created my plugin, which is now working properly. Now I want to be able to "edit" the plugin, instead of creating a new one and having to put in all the configuration again every time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm still researching, but I note that the link you provided is for Confluence Server while your post is tagged as Confluence Cloud. Are you developing for Confluence Server or Confluence Cloud?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahh yes I'll change the tag to server. I'm using the atlassian sdk so developing the plugin locally before pushing it to Confluence server
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So is the editing issue you are having about editing your plugin code, or editing the macro (supplied by the plugin) after you add that macro to a page?
You said you used the document as a starting point. Where did you deviate from the document, specifically in the section "Creating a Macro Element in Confluence"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Editing the macro (supplied by the plugin) after I add that macro to a page. As for the document, my macro is much more complex than the basic document but the plugin itself is not the problem since the plugin works. I want the ability to edit its configuration after the macro is added to the page.
For a simple example to illustrate what I'm talking about, say the macro takes in a parameter called name and prints out "Hello [name]". I want to be able to edit the page, then click on edit macro, then change the name I supplied, etc. However, right now, when I click on edit macro, I get the error message I showed since I don't have metadata configured.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that clarification.
You are able to create a new page, add the macro, and edit the configuration elements of the macro, correct?
The problem is only when you try to edit a page where the macro has already been inserted and configured, correct?
So far I am not finding explicit references point to exactly what the metadata is for a macro.
In your atlassian-plugin.xml file what elements do you have in your xhtml-macro section, compared to the example?
<xhtml-macro name="helloworld" class="com.atlassian.tutorial.macro.helloworld" key='helloworld-macro'>
<description key="helloworld.macro.desc"/>
<category name="formatting"/>
<parameters/>
</xhtml-macro>
I'm thinking maybe that section is the metadata for the macro.
This page about creating User Macros (in the UI) talks about metadata.
https://confluence.atlassian.com/doc/writing-user-macros-4485.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes I have atlassian-plugin.xml configured that way. I checked out that link earlier as well but it was quite confusing and I couldn't figure out how exactly to go about configuring metadate do get the edit part working
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I ran into the same issue. Read my discussion here and vote for the issue:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.