-
Couldn't load subscription status.
- Fork 2.8k
Description
Which Umbraco version are you using?
16.3.3
Bug summary
When I delete an ancestor of content with a domain assigned to it, I cannot add that same domain to a different content item. I receive an error that says that the domain is used by another content item, even though that content item is deleted, along with its ancestors.
Specifics
This error happens in the backoffice, but also when using the Management API from an external integration. In my specific case, I create content scenario's for acceptance testing, in which I delete all content in the content tree and recreate it to ensure consistent state. I get an HTTP 409 response with a message that the domain is used, even though the content was just deleted. I can recreate this error in the backoffice with simple content editing:
After restarting the website, I am able to assign the domain, so it seems that this issue is related to a stale in-memory cache somewhere.
Steps to reproduce
- Create one or more content types in the backoffice. Ensure that you can create a content tree with at least one root node and one child node
- Create a content tree with one root node and one child node
- Assign a domain to the child node, for example "localhost:44376"
- Throw the root node (the one that DOES NOT have the domain assigned) into the trashcan
- Empty the trashcan
- Recreate the content tree
- Attempt to assign the same domain to the new child node
- Observe the error message
Expected result / actual result
I expect, when a node with an assigned domain is deleted, I can assign the domain to a new content item. Instead, I receive an error message that I cannot assign the domain, even though I should.