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

Confluence Wiki Markup Search and Replace

Gavin Fowler
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.
September 21, 2011

With the recent introduction of Confluence 4.0, I've taken a look at some of my user macro's. Many are very basic and were thrown together and should really be reworked. The trouble i have is, if i make substantial changes to the way these macro's work (change structure, name, fields, body), how can i quckly / easily retrofit these changes back into the pages that use these macro's. I'm talking a small number of macro's used 1000's of times across multiple spaces.


I had a quick look here (altassian answers) and in the plugins library, but nothing jumped out that would suit my confluence 3.5.11 (production) or confluence 4.0.0 (pre production testing) installation. I'm happy to apply the change to any installation (assumes i don't roll 4.0 into production any time soon).

Any worked suggestions / advice much appreciated.

5 answers

1 accepted

2 votes
Answer accepted
Jean de Laulanié
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.
September 22, 2011

Hi there,

you can use this plug-in https://plugins.atlassian.com/plugin/details/162 not officially compatible with v3.5 but by adding the backport jar file, it will work just fine.

be careful though it's quiet powerful, i believe you can use regex to narrow down your search.

i've used it in the past to change user macro names accross several spaces.

cheers,

Gavin Fowler
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 24, 2011

A late follow-up (i orginally just used the solve button), but to help others. Jean's solution worked perfectly well. I took the advice, in the link he gave, and embeded the recomended back port into the plugin jar file and then uploade the plugin into confluence. It solved my issue for bulk changing a user macro that was used 1000's of times across 20+ spaces. my version of confluence at the time was 3.5.11.

2 votes
Sven
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.
January 25, 2012

Just to add that one possibility is to configure a drive for WebDav-Access. Each page is then a folder with a *.txt-file containing in storage format the content of that page.

Using a text editor (like Notepad++) and the option "Find and Replace in Files" (include subdirectories) I was able to do some extraordinary useful patches...

1 vote
Sherif Mansour
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2011

Hi Gavin,

In relation to find/replace text, we are looking at implementing that in the near future: https://jira.atlassian.com/browse/CONF-2522 However in your case, you want to find/replace macros, I haven't heard of that request too often. A cheap/hacky workaround might be some database scripts to find/replace, although that might be a bit risky.

Gavin Fowler
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.
September 22, 2011

Thanks for the feedback Sherif, the link you embeded results in a Jira error "Project Not Found". I'm assuming it's a permissions thing. Any idea on the timeline?

I'm asuming i will have upgraded to confluence 4.0 before any new features (such as search and replace) are introduced. Do you think the search and replace your referring to will have the capablities to find and replace Confluence version 4.0 macro notation / markup??

Thanks

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2011

There's a period/full-stop at the end of the URL which is breaking the link. - I've fixed it now

0 votes
Barbara Green November 20, 2013

Would there be any hope of getting this to run in 5.3.1? I have the same issue with user macros and we are trying to clean up data.

0 votes
AM November 18, 2011

Please check:

https://answers.atlassian.com/questions/21735/occupy-confluence-markup-provide-a-wysiwyg-xhtml-markup-editor-to-edit-the-markup-source-of-confluence-4-wiki-pages

A-M

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events