Updating old macros with a macro ID

Hi all,

I have a user macro that I want to replace with a macro plugin. The new macro plugin relies on the macro ID feature to find itself in the page of the conversion context (via StAX). This works pretty well for new macros. But the old user macros do not have macro IDs. If I edit a page and save it, the macro ID is added, but I won’t do that for 10k+ pages. And I also want to keep the last editor and editing date.

I have tried to use a custom macro migrator, but as per my understanding, the migrator does render the macro each time it is called but does not store the newly added ID. Even if it would store the ID, this would not actually mean that the macro element is updated with ac:macro-id="blah" within the page’s body storage.

So how can I update these macros in the 10k+ page bodies?
Alternatively: Do you know another method for getting the position of a macro in a page so that I could circumvent the macro id in the page body (please do not suggest a solution that contains comparing the whole macro elements to each other in the document)?

Thank you an best regards

Hey @alexander.botor,

Are you talking about doing this in a single Confluence instance or across multiple instances?
And is this a one-time conversion you want to do or should this be something that’s easily repeatable?

Hi @pvandevoorde,
sorry that I am replying only now. This is for a single instance. And it is a one-time conversion. We have now decided to do this bare metal on the database table BODYCONTENT. This also circumvents any problems with German Umlauts and maybe other entities.
Shoud i mark this as solved?

Best regards