Not applicable

How to delete Nintex content types after uninstalling Nintex?

Hello,

After uninstalling Nintex workflow and Nintex form 2010, in the site collections there are several content types related to Nintex which can not be deleted:

   $Resources:NWResource,_ContentType_MultiOutcomeTask_Name;

   $Resources:NWResource,_ContentType_Snippet_Name;

   $Resources:NWResource,_ContentType_Task_Name;

   $Resources:NWResource,_ContentType_Template_Name;

   $Resources:NWResource,_ContentType_Workflow_Name;

when I try to delete them I get the following error:

Server Error in '/' Application.

--------------------------------------------------------------------------------

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.

Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".

<!-- Web.Config Configuration File -->

<configuration>

    <system.web>

        <customErrors mode="RemoteOnly"/>

    </system.web>

</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>

    <system.web>

        <customErrors mode="On" defaultRedirect="mycustompage.htm"/>

    </system.web>

</configuration>

-----------------------------------------------------------------------------------------------

How can I delete them?

0 Kudos
Reply
6 Replies
francois
Forms Fledgling

Re: How to delete Nintex content types after uninstalling Nintex?

About the configuration to have the detail of the error, your have another option:

In the web.config,

  • Turn on the call stack (CallStack="true")
  • Disable custom errors in Visual Studio (<customErrors mode="Off" />)
  • Enable compilation debugging (<compilation debug="true">)

source: Debugging SharePoint Solutions

In case of you have not enough detail, you can change the customErrors value in the web.config available in the "_layouts" hive.

About the content type, may be you have always some list or document library that use these content types or may be you have some content in the recycle bin that referenced these content type (delete from site recycle bin, delete from Site Collection > Site Settings > Site Collection Administration > Recycle Bin, delete from End User Recycle Bin Items and delete from “Deleted From End User Recycle Bin").

Other element to check, the SharePoint logs. That files can help you to know why the deletion cannot be done.

And last chance, did you try to use PowerShell to remove them?

Reply
Not applicable

Re: How to delete Nintex content types after uninstalling Nintex?

Thanks for your reply! Using a power shell script, it is revealed that the content type is used in a library! However, I can not find it in that library in order to remove it! How can I remove them with power shell? I have tried the following script but it has no effect:

$sitename = "My site collection URL"

$contentType = "$Resources:NWResource,_ContentType_MultiOutcomeTask_Name;"

$web = Get-SPWeb $sitename

$ct = $web.ContentTypes[$contentType]

if ($ct) {

$ctusage = [Microsoft.SharePoint.SPContentTypeUsage]::GetUsages($ct)

  foreach ($ctuse in $ctusage) {

        $list = $web.GetList($ctuse.Url)

        $contentTypeCollection = $list.ContentTypes;

        $contentTypeCollection.Delete($contentTypeCollection[$ContentType].Id);

        Write-host "Deleted $contentType content type from $ctuse.Url"

        }

$ct.Delete()

Write-host "Deleted $contentType from site."

} else { Write-host "Nothing to delete." }

$web.Dispose()

0 Kudos
Reply
francois
Forms Fledgling

Re: How to delete Nintex content types after uninstalling Nintex?

Could you add the "$ctusage.Count" in your script, after initialization of the "$ctusage" variable?

If the value is 0, make sure the content type is not under either "Recycle BIN" or "Site Collection Recycle Bin" (4 checks to do).

You can add the command "Write-Host $ctuse.Url" in your loop to see where is the list concerned by this content type.

0 Kudos
Reply
Not applicable

Re: How to delete Nintex content types after uninstalling Nintex?

I applied your suggestion but still there is no change. It also generates no output:

$sitename = "my site collection URL"

$contentType = "$Resources:NWResource,_ContentType_MultiOutcomeTask_Name;"

$web = Get-SPWeb $sitename

$ct = $web.ContentTypes[$contentType]

if ($ct) {

$ctusage = [Microsoft.SharePoint.SPContentTypeUsage]::GetUsages($ct)

$ctusage.Count

  foreach ($ctuse in $ctusage) {

        $list = $web.GetList($ctuse.Url)

        $contentTypeCollection = $list.ContentTypes;

        $contentTypeCollection.Delete($contentTypeCollection[$ContentType].Id);

        Write-host "Deleted $contentType content type from $ctuse.Url"

  Write-Host $ctuse.Url

        }

$ct.Delete()

Write-host "Deleted $contentType from site."

} else { Write-host "Nothing to delete." }

$web.Dispose()

0 Kudos
Reply
francois
Forms Fledgling

Re: How to delete Nintex content types after uninstalling Nintex?

For SharePoint, Content type doesn't exist anymore.

It seems there is always a reference somewhere.

Could you check if every feature have been well uninstalled?

You can make a SQL query directly in the database to check that too (get the contenttype ID before):

SELECT [SiteId], [Class], [Scope], [ContentTypeId], [Version], [NextChildByte], [Size], [Definition],[ResourceDir], [SolutionId], [IsFromFeature], [DeleteTransactionId]

  FROM [WSS_Content].[dbo].[ContentTypes]

  WHERE sys.fn_varbintohexstr(ContentTypeId) LIKE '0x010100F8376F5313D041EF85718B229F4FBFA8' --Nintex WF Template ref

If the column "isFromFeature" is equal to '1', signifiaction is that there is feature which deploys this content type, and may be this feature is not well uninstall.

Nothing in the recylce bin (4 levels)?

Can be interesting: Unable to delete a content type from a List (TroubleShooting) | Bugra Postaci's Blog

0 Kudos
Reply
eiben
Design Canvas Artiste

Re: How to delete Nintex content types after uninstalling Nintex?

Well, you also have to make sure, that no content created with this content type exists anymore - this includes the trash! You should check and make sure no deleted items with this content type are still in the trash.

Reply