Preventing unnecessary revisions with API and wiki markup

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

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,898 views 25 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you