Replace "Numbered Headings" Macro with User Macro - retaining content

Thorsten Vieten January 13, 2020

Hi Community!

We have been using the free version of the "Numbered Headings" macro a lot. Now that the most recent versions have moved to a paid model, we would like to stop using the macro.

Is there any way you know that we can replace the macro with a same-called user macro and retaining the content?

My tests in our test environment allowed me to replace the macro so that the pages were VISIBLE (view mode). But as soon as I was hitting edit mode, there was only a blank page and all content lost.

Any ideas would be highly appreciated.

Many thanks in advance,

Thorsten

 

3 answers

2 accepted

0 votes
Answer accepted
Thorsten Vieten May 12, 2021

What we ended up doing was:

  1. Upgrade the system to the latest version (i.e. beyond 7.8, which introduced "Disabled macros will preserve your content"
  2. Follow this KB article How to bulk update Confluence content through the database to replace old macros with new ones | Confluence | Atlassian Documentation

Problem solved.

0 votes
Answer accepted
A B
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 11, 2021

I worked around this by adding the following to custom HTML:

AJS.$(document).ready(function() {
if (!AJS.clone)
AJS.clone = e => { e = AJS.$(e); if (e.length) return AJS.$.clone(e); return AJS.$(); };
});
Thorsten Vieten May 12, 2021

Interesting option, thanks Adam! What is AJS?

Nicolas Casel
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.
October 5, 2021

AJS is an object which allows Confluence to update DOM elements via HTML and Javascript code.

Nicolas Casel
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.
October 5, 2021

Thanks @Adam Butcher 

How is it supposed to work? I guess I have to insert this JS code within the page containing the Numbered Headings macro, and then: should I disable the macro or let it enabled? In both cases I do not get successful outcome.

abutcher
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 5, 2021

Add it within a style block in your site's Custom HTML (at the end of HEAD).  If you don't have admin rights on the server, you would have to ask your admin to do it.  The config page is /confluence/admin/editcustomhtml.action at your server (assuming a /confluence/ context path; drop that if you are going direct to the port).

However, there appears to be a more "supported" way to still use the free version according to the comment below.  Maybe go via that avenue if you want an official solution.

Gert-Jan van de Streek
Contributor
October 5, 2021

Echoing @Adam Butcher , Numbered Headings was created as an app to fill a gapp, not leave you with another problem. We will help you solve this without the combersome workaround. Please contact us via support.

Nicolas Casel
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.
October 6, 2021

Thanks @abutcher , but it does not work better (I can't see any impact).

@Gert-Jan van de Streek  , yes I will contact your Support Team (we were already in contact some months ago).

1 vote
Gert-Jan van de Streek
Contributor
May 12, 2021

We have communicated to all customers that have been on the free version for a long time how they can keep making use of that functionality. If you missed that, feel free to reach out to our support and we'll help you out. There is no need to workaround this.

Thorsten Vieten May 12, 2021

That ship has sailed :)

Gert-Jan van de Streek
Contributor
May 12, 2021

You know where the harbor is. We're there to help, any time.

tobias.kritten March 15, 2024

Hi @Gert-Jan van de Streek , we are using the free macro for quite a long time and are migrating to cloud. How can we either continue using the free version or remove the macro wrapper around the content?

Gert-Jan van de Streek
Contributor
March 15, 2024

Please contact support, you can find links to email or service desk via via https://marketplace.atlassian.com/apps/16063/numbered-headings?tab=support&hosting=cloud

Like tobias.kritten likes this
tobias.kritten March 18, 2024

@Gert-Jan van de Streek Your support really not wants to help ;-) Could you please have a look at SUPPORT-174882? It seems you are neither offering a free cloud version nor any help with removing the macro.

tobias.kritten March 20, 2024

@Gert-Jan van de Streek just got final confirmation your support won't be able to help. We have to change all pages/macros manually on every page. Was that the intended outcome when you asked me to open a case? 

Gert-Jan van de Streek
Contributor
March 22, 2024

It is always my intend to help, I have sent you a pm so we can take this offline.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events