Thursday 16 December 2010

Cannot delete document type - Umbraco

This has been my week of Umbraco database corruption hell!

Today I wanted to delete a document type that just didn't want to budge. There was nothing in the log table, so I opened up firebug and saw this little error:


{"Message":"Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery","StackTrace":" at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters)\r\n at umbraco.cms.businesslogic.ContentType.Tab.Delete()\r\n at umbraco.cms.businesslogic.ContentType.delete()\r\n at umbraco.cms.businesslogic.web.DocumentType.delete()\r\n at umbraco.nodetypeTasks.Delete()\r\n at umbraco.presentation.create.dialogHandler_temp.Delete(String NodeType, Int32 NodeId, String Text)\r\n at umbraco.presentation.webservices.legacyAjaxCalls.Delete(String nodeId, String alias, String nodeType)","ExceptionType":"umbraco.DataLayer.SqlHelperException"}


I started to delete the properties and tabs manually. Umbraco crashed when trying to delete a tab. It was another foreign key issue.

So again, the solution was to change a delete rule (see my last 2 posts). This time it was cmsPropertyType_cmsTab. I changed it to cascade.

Now I was able to delete the tab as normal.

After that tab was deleted, I was able to delete the document type.

I win again!


1 comment:

  1. Thanks
    If is wasn't for your post I wouldn't even think about checking there

    ReplyDelete