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

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.

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?

0 vote
Joseph 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!

0 vote
Joseph 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 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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Asked May 24, 2018 in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

603 views 18 16
View question

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