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

Sander Brienen [Avisi]
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.
March 26, 2012

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

1 vote
Answer accepted
Sander Brienen [Avisi]
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 3, 2012

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.

0 votes
Jürgen Müller October 21, 2013

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 ?

0 votes
Sander Brienen [Avisi]
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.
March 26, 2012

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
Atlassian Team members are employees working across the company in a wide variety of roles.
January 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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events