Umbraco

Potential data corruption using bulk operations in Umbraco 8

Find out how to work around this

Claus Jensen
Written by Claus Jensen

We have detected a bug in Umbraco 8. This bug occurs when performing bulk operations on both media and content of more than 500 items in one operation. While we are working on a fix, we want you to be aware of the workaround:

Recently we’ve seen a few reports of media libraries ending up in an unfortunate state where you could encounter errors when browsing your media library. It has not been entirely clear to us what could cause a site to end up in this situation, and while at the same time this did not seem like a consistently reproducible problem, it has been a challenging task to investigate based only on the evidence of media libraries being in the broken state.

However, with the help of our fantastic community, we have now been able to consistently reproduce the situation, with an anonymized pre-broken database backup allowing us to see and investigate exactly what happens during the corruption phase.

The investigation showed that Umbraco 8 has a bug affecting some bulk operations on both media and content when handling more than 500 items in one operation.

Workaround 

While we are working on a fix, we urge you to hold back on large bulk operations such as moving larger amounts of content or media (500+ items) in one single action. An example of this could be moving a node that has a large amount of descendant nodes being affected by such an operation.

If you cannot avoid having to do this right now, please consider if you can temporarily work around the issue by moving your content in smaller chunks of less than 500 nodes and then consolidating it all back into the original structure in the end. The problem is not that you cannot have many child/descendant nodes - you just cannot perform bulk operations on these without risking causing data corruption on parts of your content.

We would also like to highlight that while this issue is potentially causing data corruption, the state is not permanent. Having corrupt data will cause issues when trying to access these specific items, but we are on top of the problem and can with confidence say that the data is in a state where it is completely fixable regardless of when the upcoming fix is applied.

As soon as we have a well-tested fix that is confirmed to work, we will release this including a health check to check your database for consistency and correct anything that may have been corrupted by this issue. If you already have corrupted data and cannot wait for the health check to be released, you can manually run this SQL script to identify and fix the data in your database. Please make sure to follow the instructions and always do a database backup before manually modifying your database. 

All versions of Umbraco 8 (8.0 → 8.6) are affected by this.

If you are interested in the technical explanation of the issue, please refer to Github where the details of this are currently being discussed.

We'll keep you updated on the progress of this fix in future Product Update blog posts.