Wednesday, April 23, 2014

SharePoint 2010 - Deleting a content type - Error message "The content type is in use"

I got mad with an issue. I have programmatically created content types and added them to new document libraries. I figured out some errors and I wanted to delete all and start from the scratch. So I deleted all document libraries and afterwards I tried to delete the content types - with the result: Error - "The content type is in use". :-(

Server Error in '/' Application.
The content type is in use.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.  
Exception Details: Microsoft.SharePoint.SPException: The content type is in use. 
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
Stack Trace:
[SPException: The content type is in use.]   Microsoft.SharePoint.SPContentTypeCollection.DeleteFromWeb(SPContentTypeId id,    String strName) +648   Microsoft.SharePoint.SPContentTypeCollection.Delete(SPContentTypeId id) +26928500   Microsoft.SharePoint.SPContentType.Delete() +85   Microsoft.SharePoint.ApplicationPages.ManageContentTypePage.DeleteContentType() +145   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,    String eventArgument) +29   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,    Boolean includeStagesAfterAsyncPoint) +2981
Version Information: Microsoft .NET Framework Version:2.0.50727.5477; ASP.NET Version:2.0.50727.5479 

I got mad with this issue, because I deleted everything, even I cleaned the recycle bin, which is visible on the pages. Nothing helped. Still got that error, but the solution is so simple:

Navigate to "Site Settings". A subpoint of "Site Collection Administration" is "Recycle bin".
You have 2 views:


Mark all items in both views and delete all.
Then it worked for me. Hope it solves your issue, too.


No comments:

Post a Comment