macros with different case not upgraded from confluence 3 to confluence 4

When upgrading from Confluence 3 to Confluence 4 not all macros were upgraded. The problem was with cases.

Two examples to illustrate.

Example A:

{numberedheadings}

h1. Content heading 1

Some text

{numberedheadings}

Example B:

{numberedHeadings}

h1. Content heading 1

Some text

{numberedHeadings}

In Confluence 3 both blocks of code worked fine.

In Confluence 4 though the block with Example B is not migrated but wrapped in a Wiki Markup macro. Example A is migrated without problems.

In the plugin xml, the macro name is with lower-cases only for both Confluence 3 as Confluence 4.

It seems that in Confluence 3.x a macro name entered with mixed case are all handled correctly. When upgrading to Confluence 4, the upgrade script does not seem to be aware of other cases then lower-case. This results in an confluence instance where only the macro's are upgraded that exactly match the name of the macro in the plugin xml while otherwise spelled macro's are wrapped in the Wiki Markup macro.

3 answers

1 accepted

The answer from support:

This should work only on MySQL, but do check for your DB if there are any Find and Replace SQL queries such as this: http://www.mediacollege.com/computer/database/mysql/find-replace.html. What you will need to do is basically run this query to find all instances of {numberedHeadings} and replace it with {numberedheadings} (REMEMBER TO MAKE A DATABASE BACKUP FIRST!This query will find and replace all instances of the string match, in all of your content, so this is quite a risky query. So, backup backup backup!):

UPDATE BODYCONTENT SET BODY = replace(body, '{numberedHeadings}', '{numberedheadings}');

After running this query, navigate to <tt>Confluence Admin >> Cache Statistics >> Flush All</tt>. (you can check also if the pages that have the numberedHeadings macro, is reset to numberedheadings, after flushing the cache.

Now, the next step will be to remigrate the unmigrated Wiki Markup wrappings. You will need to navigate to http://<yourconfluenceurl>/admin/unmigratedwikicontent.action , and click Update Content. This should remove all Wiki Markup wrappings for those macros, and everything should be back to normal.

This is the answer I got from support:

It seems that this is a confirmed bug with Confluence 4 and up; Bug is raised here: https://jira.atlassian.com/browse/CONF-24900

Please vote up this bug to get this fixed asap!

David Mason Atlassian Team Jan 17, 2013

The bug has been fixed in Confluence 4.3.5 by https://jira.atlassian.com/browse/CONF-23927, which was the same bug as https://jira.atlassian.com/browse/CONF-24900.

I have a similar problem with numberedheadings Macro pages are not converted to the new XML format during the upgrade.

The macro is not recognized, although it is lower case. Uninstalling and reinstalling did not help. Is there a solution ?

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
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

865 views 23 12
Join discussion

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