Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to remove "unknown macro" in confluence

Siddheshwar mhetre
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.
April 26, 2015

I have upgrade confluence 3.x to 5.x

In earlier version(i.e. 3.x) I was using some macros, but in latest version (5.x) most of the macros are not compatible.

Currently in latest version it is showing following unknown macro error

bm1.jpg

So I want to remove these Unknown Macro from confluence 

I do not want to uninstall plugin/macro from my system, just need to remove this error from my page.

From database can we write any query?

or any plugin to remove the Unknown Macro?

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 27, 2015

Once you've done what Lukas suggests in terms of working out which macro is broken, I usually cheat quite a lot and write a "user macro" with the same name, and accepting the same parameters

This will:

  • Work automatically
  • Allow you to use the "macroName: X" search to get pages where it is used so you can edit it out
  • For a simple macro, echo out the body, parameters and a big red warning that the macro is broken and implore the users to edit the page to replace it with something better
  • If you can reproduce the desired functionality in the user macro, you may not need to remove anything

I wouldn't try anything with SQL until the very last resort.  Try the user macro tricks first

 

Mike Smith July 25, 2016

Hey Nic, great suggestion.  All I need to do now is to have the new macro output whatever is actually contained within it... can you offer a suggestion for that?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 25, 2016

What does the old macro do?

Mike Smith July 25, 2016

We’ve uninstalled theme press, and I am trying to not have to edit all of the pages where their macros were used.  Those macros are:

 

Content Layer

|à Content Column

|----àContent Block

 

They aren’t doing anything at all, but are just there.  The content within these macro blocks is normal Confluence content. The content is visible and renders correctly when editing the page, but not when simply viewing it. 

Like Sergey Yermak likes this
Mike Smith July 27, 2016

I should add that we are license holders of Theme Press.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 27, 2016

That makes sense.  I suspect you can define a replacement "user macro" called "content layer" that simple passes $body through without any parameters.  That will at least make the page viewable.

2 votes
Lukas Knoch -Rumpelcoders-
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.
April 26, 2015

If you find out wich macro is causing the error by looking at the editor, you can remove all the macro(s) with this plugin: 

Search and Replace

Siddheshwar mhetre
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.
April 26, 2015

Thanks Lukas, Is it working for Unknown Macro? I have tried this for used macro, it is working fine. But unknown macro it is not showing any occurrence.

Lukas Knoch -Rumpelcoders-
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.
April 26, 2015

Usually it is a macro that causes the 'unknown macro' text to appear on the page. When you edit the page, what is shown in the wysiwyg at the place of the "unkown macro " error ?

Siddheshwar mhetre
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.
April 27, 2015

on edit page it is showing like {xyz}some text {xyz} After save the page it is showing Unknown Macro : xyz

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 27, 2015

Your xyz is the name of the macro. The search and replace trick Lukas suggests will work, but you'll need to replace it with something that preserves your data.

Siddheshwar mhetre
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.
April 27, 2015

Yes Nic, I want replace these unknown macro with blank space.

Lukas Knoch -Rumpelcoders-
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.
April 27, 2015

if the macro is wrapped in a wiki-markup block, the suggested opition won't work, I'm sorry. Your only option with search and replace would be to replace all wiki-markup macros, wich would also remove other wiki-markup macros with working content.

Siddheshwar mhetre
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.
April 27, 2015

ok thanks

TAGS
AUG Leaders

Atlassian Community Events