Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • DS 21 posts 162 karma points
    Mar 08, 2016 @ 23:41
    DS
    1

    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:

    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)
    

    Any ideas on how I can get this doc type deleted?

    Thanks

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Mar 09, 2016 @ 12:59
    Alex Skrypnyk
    0

    Hi Dustin,

    I'm not sure that it will help, but try to rebuild indexes in Umbraco Examine tab.

    Thanks

  • DS 21 posts 162 karma points
    Mar 09, 2016 @ 15:59
    DS
    0

    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.

  • Pawel Bres 39 posts 160 karma points c-trib
    Mar 09, 2016 @ 14:21
    Pawel Bres
    0

    It could be also related to indexes in db. You can try to rebuild indexes for umbraco tables.

  • Stephen 767 posts 2273 karma points c-trib
    Dec 01, 2016 @ 17:55
    Stephen
    1

    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.

  • Puck Holshuijsen 184 posts 727 karma points
    May 23, 2017 @ 13:33
    Puck Holshuijsen
    0

    Thank you very much!

  • Stephen 767 posts 2273 karma points c-trib
    Dec 08, 2016 @ 10:36
    Stephen
    1

    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.

Please Sign in or register to post replies

Write your reply to:

Draft