How to resolve collision errors
Last updated
Was this helpful?
Last updated
Was this helpful?
This guide is for solving collision errors on your Umbraco Cloud project. Use this guide when you encounter an error like this:
The error means that two (or more) .uda
files have been created for the same entity. The .uda
files contain schema data for each of your entities. For example, Document Types, Templates, Macros, Dictionary Items, Data types, and so on. For a full list of these entities, see .
In this example, there are two .uda
files that share the same alias which leads to a conflict: it is impossible for Deploy to know which of the files to use, so it gives up and sends an error back.
You can run into an error like this on all of your Cloud environments. Sometimes you might also run into it on a local clone of your project.
This guide uses an example where two files are colliding across two environments: a left-most environment and the Live environment.
For clarity, the left-most environment will be referred to as the Development environment throughout the guide.
In the example above, the entity involved is a Document Type with home as the alias. There are two colliding files both located in the /deploy/revision
folder. The files are colliding because they share the same alias but have different GUIDs (also the name of the files).
In order to fix this problem, you will have to decide which of the colliding entities is the correct one and the one you want to use on your Live environment.
Let's use the example from the beginning of this article, where two .uda
files for the Document Type "home" are colliding.
For this example, it’s decided that the Document Type currently used on the Live environment is the one we want to use going forward.
In order to figure out which of the two colliding .uda
files are the one for the Document Type being used on the Live environment follow these steps:
Run one of the following queries on the database, depending on the type you see the error with
Run the following query, if the error states that the error is a Collisions for entity type "document-type"
:
Run the following query, if the error states that the error is a Collisions for entity type "template"
:
Run the following query, if the error states that the error is a Collisions for entity type "macro"
:
Run the following query, if the error states that the error is a Collisions for entity type "data-type"
:
The above-mentioned queries will give you the udi of the entity in use on the live environment.
You now know which .uda
file you want.
We strongly recommend that you resolve this locally since this will ensure that the changes you make are added to your Git repositories. Otherwise, you may end up having the same problem next time you deploy.
Clone down the Development environment to your local machine.
Run the project locally and verify that you get the same extraction error as on your Cloud environments (HINT: look for a deploy-failed
marker in your local /deploy
folder).
When you run the project, you should see an error message in the browser once the site starts to build.
Remove the wrong .uda
file (It's the one we did not find in the live environment just before) from the /deploy/revision
folder - you will not be able to see the Document Type in the backoffice because of the failed extraction.
Open the Umbraco Backoffice and go to Settings -> Deploy to see the Deploy dashboard.
Select Schema deployment from data files
in the dropdown.
You will now see a deploy-complete
marker in your local /deploy
folder.
Before pushing the changes to the Development environment, you need to access the backoffice of the Development environment and remove the Document Type from there.
Commit and push the changes from your local clone to the Development environment, using your local Git client.
When the push from local to the Development environment has been completed, refresh the Umbraco Cloud portal and you will see that the Development environment is now green, which means that the extraction error has been resolved.
The final step is to deploy the pending changes from Development to your Live environment, to ensure everything is completely in sync.
Connect to the database of the Live environment using the .
Sometimes you might need to run another schema deployment on your Cloud environment after deploying to turn your environment green. To do this, follow the steps described in the .