Unknown macros after Confluence 3.5.13 -> 4.3.3 upgrade... how to identify incompatible plugins?
Asked by stuartu:

After doing a test upgrade of our Confluence 3.5.13 -\> 4.3.3, I see some issues in my atlassian-confluence.log about the migration from wiki to XHTML having some errors:

```
Summary:        0 settings values failed.        0 PageTemplates failed.        24 ContentEntityObjects failed.Content Migration Exceptions:......The macro 'dynamictable' is unknown.The macro 'eqnarray' is unknown.The macro 'flowchart' is unknown.The macro 'font-family' is unknown.The macro 'forum' is unknown.The macro 'jiraportlet' is unknown.The macro 'margin' is unknown.The macro 'mso-style-parent' is unknown.The macro 'portal' is unknown.The macro 'tasklist' is unknown.
```

Also a few oddball macro errors,

```
Xcom.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 127.0.0.1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' is unknown.The macro ' var strUrl = url.toUpperCase(); if (strUrl.indexOf('ASSETID=HP') &gt;= 0 || strUrl.indexOf('ASSETID=HS') &gt;= 0 || strUrl.indexOf('ASSETID=HV') &gt;= 0) window.open(url + "&amp;Client=1", "_self"); else window.open(url + "&amp;Client=1", "_blank"); ' is unknown.. Message: The macro ' var strUrl = url.toUpperCase(); if (strUrl.indexOf('ASSETID=HP') &gt;= 0 || strUrl.indexOf('ASSETID=HS') &gt;= 0 || strUrl.indexOf('ASSETID=HV') &gt;= 0) window.open(url + "&amp;Client=1", "_self"); else window.open(url + "&amp;Client=1", "_blank"); ' is unknown.	23) Type: page, Id: 96501829, Title: WS-Security, Space: its - Information Technology. Cause: com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'JBOSS_HOME' is unknown.. Message: The macro 'JBOSS_HOME' is unknown.	24) Type: page, Id: 151289861, Title: IT Team - Work status and Options (including services), Space: its - Information Technology. Cause: The macro 'mso-style-name' is unknown.
```

Looking through some other threads, this is most likely caused by incompatible plugins, but I'm not sure how to identify these.

I have deinstalled the Adaptavista Theme Builder plugin, as the v4.2.3 version that existed after the upgrade was for Confluence 3.5.

After this, I go to the `/``admin/unmigratedwikicontent.action page, and see "`  
Confluence has detected that there are **179 pages** with macros that are not yet Confluence 4+ compatible"

But on the same page, I see "Update not Required. You have not installed any new plugins since your last content upgrade. You do not need to run this upgrade..."

I presume I need to either upgrade a plugin, or install new ones, but not sure how to determine which one.

On the user macro front, one of the macros the upgrade process complains about is a simple one called "printmacro". This is as follows: (I can't figure out what is wrong with this either):

```
Print date: $generalUtil.formatDateTime($content.getCurrentDate())
```

Any help is much appreciated.

Thanks in advance

Stuart.


Answers:
author: Sow Behl
body: Hey Stuart

You don't necessarily need to have those plugins installed for the error to appear. You simply have to have any content which lists that macro and the error will appear. Ie. 'margin' macro will be in your wiki content. To find out which page is displaying this look through your atlassian-logs to find lines similar to the following:
> 265) Type: page, Id: 17465590, Title: University of Tasmania, Space: infmemory - Team - Informatics Memory. Cause: com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'margin' is unknown.. Message: The macro 'margin' is unknown.

This information tells you the space (in this case "infmemory - Team - Informatics Memory" and the pageID "17465590" which can be viewed if you goto https://www.\[yourwikisite\].com/pages/editpage.action?pageId=\[insertIDhere\])

In our organisation we had some plugins installed and then tested in sandbox environments which left their macro tags in the content. We simply deleted it and we were done!


author: Bob Swift (personal)
body: 1. dynamictable is from [Dynamic Table Plugin for Confluence](https://marketplace.atlassian.com/plugins/org.swift.confluence.dynamictable "Dynamic Table Plugin for Confluence")
2. flowchart is from [Graphviz Plugin for Confluence](https://marketplace.atlassian.com/plugins/com.atlassian.confluence.extra.graphviz "Graphviz Plugin for Confluence")

comments: author: stuartu
body: Thanks for your reply Bob, but I don't have either of those plugins installed.

I'll poke around the plugins a bit more and see if I can find the culprit.


author: stuartu
body: The Adaptavista Theme Builder plugin not upgrading is something that happens every time I do a test upgrade.

This is part of the "Essentials Plugin Pack - Adaptavista". Perhaps the way this is bundled is causing the error?

Is there some trick to upgrading this without the errors?


Tags: app

macro

upgrade