When attempting to delete a document type (the only type I have currently in this fresh install), I receive the error "Failed to delete content type". This document type does not have an associated template. I have tried deleting all properties and tabs from the document type to see if that would allow the deletion, but no luck.
Here is the log specifics:
2016-03-08 16:35:22,576 [P4444/D9/T23] ERROR Umbraco.Core.Persistence.UmbracoDatabase - Database exception occurred
System.Data.SqlServerCe.SqlCeException (0x80004005): The key cannot be deleted. The key to be deleted is already deleted from an index by another concurrent session.
at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor)
at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery()
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass1.<ExecuteNonQueryWithRetry>b__0()
at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
at Umbraco.Core.Persistence.Database.Execute(String sql, Object[] args)
Thanks for the suggestion - I tried rebuilding the indexes, but unfortunately that did not resolve the problem. I may just re-install at this point since I don't have much content in the system.
Late answer but nevertheless... this seems to indicate that the SqlCE database got corrupted (internal SqlCE bug) and there is little that Umbraco itself can do - however, using the SqlCe Toolbox tools (from https://github.com/ErikEJ/SqlCeToolbox) you can repair/compact/verify/whatever the database, and I have been able to recover databases this way.
Failed to delete document type
When attempting to delete a document type (the only type I have currently in this fresh install), I receive the error "Failed to delete content type". This document type does not have an associated template. I have tried deleting all properties and tabs from the document type to see if that would allow the deletion, but no luck.
Here is the log specifics:
Any ideas on how I can get this doc type deleted?
Thanks
Hi Dustin,
I'm not sure that it will help, but try to rebuild indexes in Umbraco Examine tab.
Thanks
Thanks for the suggestion - I tried rebuilding the indexes, but unfortunately that did not resolve the problem. I may just re-install at this point since I don't have much content in the system.
It could be also related to indexes in db. You can try to rebuild indexes for umbraco tables.
Late answer but nevertheless... this seems to indicate that the SqlCE database got corrupted (internal SqlCE bug) and there is little that Umbraco itself can do - however, using the SqlCe Toolbox tools (from https://github.com/ErikEJ/SqlCeToolbox) you can repair/compact/verify/whatever the database, and I have been able to recover databases this way.
Thank you very much!
In some cases SqlCe Toolbox can fail to repair the database. Need to use the right version of SqlCe. See a solution at https://www.zpqrtbnk.net/posts/repairing-the-umbraco-sqlce-database.
is working on a reply...