Preventing unnecessary revisions with API and wiki markup

Alex Corcoles May 19, 2017

Hi,

We have some legacy processes which update Confluence periodically using the XMLRPC API and wiki markup.

Previously, Confluence was "smart" about updates and if you stored a page over an existing one without changes, it would not create a new revision.

However, at some point, after the storage format changes, if using wiki markup, it would create a new revision even if there are no changes.

Due to our processes, this generates a sizable amount of unnecessary revisions which we fear might have an impact on performance (not to mention making reviewing a page's history unbearable and messing around with watches).

We patched our processes to fetch the page's existing content, convert our new content to storage format and compare both- if they match we don't update the page.

This works in some cases, but we've noticed that convert to storage format does not actually match what is actually stored in all cases and thus, for some page, we still create unnecessary revisions.

We've found a few transformations we can apply to minimize this, as it seems that Confluence is somehow normalizing storage format after converting from wiki markup, but this feels very hacky.

Is there an alternative way to prevent this problem? Unfortunately, converting our processes to not use wiki markup is a huge amount of work and we would like to avoid that.

Cheers,

Álex

1 answer

1 accepted

0 votes
Answer accepted
Alejandro Córcoles June 7, 2017

Actually, the solution was much simpler in the end; just convert the markup to storage format using convertWikiToStorageFormat and then store the page with the v2 API, that seems to work.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events