Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Correct way to uninstall a plugin and remove all uses on pages in confluence

Robin Peters
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 8, 2016

Hello,

My confluence instance has an old plugin which is not compatible with the actual and future confluence versions. All of the functionality of the plugin can now be done with Confluence standard functionality.

But there are a lot of pages using the old plugin. My question is how to change the old pages. On ~600 pages one module is used and this should be deleted with content (rest of page has to stay).

On ~1000 pages the module container should be deleted, but the content of the module should stay.

1600 pages is to much to edit by hand, so I need an automatic way.

I wrote some MySQL commands which do these jobs. But one small error on a page and I destroy the whole page content (by destroying the storage format), so manipulating the database directly sounds problematic.

How did you uninstall plugins and remove the used modules on pages?

Is there a way to do this programmatically with an addon? Is there a way to check all confluence pages for their storage format so I can be sure my scripts worked fine on every page?

I hope someone of you had the same problem earlier and can help me.

 

Regards,

Robin

3 answers

1 accepted

0 votes
Answer accepted
Robin Peters
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 17, 2016

Ok, I summarize: There is no way to clean up an old plugin.

I have to manipulate the database directly and have to take care for functional scripts.

So, what I did is to get all bodies of pages my script changed and tried to paste them into "view source"-macro of a page as one. Then apply the changes and confluence check the page syntax. I got no errors so I hope all is fine.

2 votes
Alex Yasurek
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 8, 2016

Hi,

I have never had to do something like this but I don't think there is any other way to remove this plugin from pages except to go page by page and delete the code. You can do this with the API or like you did with the MYSQL commands but you are right that one little mistake and the page breaks. I would suggest making a back up of the instance and then running your script. Worse case you just revert to the back up if things break.

 

There is this search and replace plugin but it essentially does the same thing you were doing but it does give you a list of pages where a specific macro exists: 

https://marketplace.atlassian.com/plugins/at.rumpelcoder.confluence.search-and-replace/server/overview

TomC
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 8, 2016

+1 on doing the backup as a regular good practice before doing anything you are concerned about may affect your production instance. The other consideration is trying whatever approach you wish to on a test or staging version of your Confluence instance. For example, we typically install new or significant updates of plugins on our test/staging version to review impact for both technical and practical reasons.

Robin Peters
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 11, 2016

Yes, I have a testing instance for sure where I tested my scripts. They work - but only for all pages I had controlled.

Is there some kind of "Integrity Checker" in Confluence like in JIRA to check all pages for a valid storage format?

0 votes
Robert Ortner April 8, 2016

think a lot before you install a plugin and give it to your users - if I remove plugin I search and replace it on database level, but it´s tricky

Robin Peters
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 11, 2016

Do you know a trick to check all pages for valid storage format?

In JIRA there is something like "Integrity Checker". Is there something equal in Confluence?

Robert Ortner April 11, 2016

only for macros - like search for: macroName:excerpt-include*

 

https://confluence.atlassian.com/doc/confluence-search-syntax-158720.html

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events