Confluence 4.0. No Wiki-markup in macros. How to workaround

I was unpleasantly surprised, that all my macros have stopped working after moving to Confluece 4.0. There is no options "Output format - Wiki markup" anymore.

What should I do? How to work it around? How to call a system macro in my XHTML (now) macro?

Thanks.

5 answers

This widget could not be displayed.

Ok, I found a part

it's my new body of the macro:
<ac:macro ac:name="info" >
text text text
<ac:macro />

it works partly - it draws a blue panel, but without the text inside. Need help.

This widget could not be displayed.

i am also having issues with all of the macros, in the theme plugin that I developed, not working in Confluence 4.0. What is the quickest and simplest way to resolve the issue without having to re-write the code? My client is concerned about the cost of upgrading the theme plugin every time a newer version of Confluence is released. Are there always this many changes when a major release of Confluence is re-leased? What are your plans for the future? Will there be more major changes to how macros are developed?

This widget could not be displayed.
Joe Clark Atlassian Team Oct 03, 2011

@Sue - Confluence 4.0 is fairly unique in the scope of changes to Confluence in that we completely altered the storage format of Confluence from wiki markup to XHTML. In honesty, Confluence 4 is probably the biggest change to Confluence ever, and it's probably unlikely that things will change this much again.

We have lots of resources to help plugin developers prepare for Confluence 4.0 upgrades. This page is a good starting point: https://developer.atlassian.com/display/CONFDEV/Preparing+for+Confluence+4.0

If you have any specific questions or problems, please feel free to ask questions on this site and our community can help you out!

This widget could not be displayed.
Joe Clark Atlassian Team Oct 03, 2011

Just trying to understand your question properly, Alex - so you have a macro which, when rendered, includes in its content, an {info} macro?

Does your macro have a body? Is the contents of the {info} macro hard-coded, or configurable by the user?

If you want to convert wiki markup into XHTML, you can get a com.atlassian.confluence.content.render.xhtml.Renderer bean injected into your macro class, and then use that to convert a {macro} string in wiki markup into the corresponding rendered XHTML.

This widget could not be displayed.

This should work:

## @noparams

&lt;ac:macro ac:name="info" &gt;

 &lt;ac:rich-text-body&gt;

$body

 &lt;/ac:rich-text-body&gt;

&lt;ac:macro /&gt;

---

And then set the macro as "Escaped".

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

85 views 12 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you