Try our conversational search powered by Generative AI!

Delete content types not available in code



We have got both blocks and pages that are no more available in code. How can we delete content types not available in code anymore 

We tried to delete one block through CMS admin site, but that block have got a lot of instances. So we have to delete them first and before that remove block from other pages/blocks. Is there any easier way to this ?

Mar 05, 2024 10:14

You can use something like this to create a scheduled job or admin tool to delete missing content types on-demand.

Edited, Mar 05, 2024 15:51

I believe Per Nergard and Jeremy Brown have helped develop a plugin for such as case, one is CMS 11 the other is an updated version for CMS 12.

Mar 07, 2024 11:16

I had a quick look at the Jeremy Brown solution.  It would be easy to put that in a Razor Class Library and package it up for the Optimizely nuget feed.  I've even suggested it to the author :)

Mar 18, 2024 14:49

Based on the gists from Jeremy and Per Nergard, with the suggestion from Mark I have create a plugin:

Should do the trick and all feedback is welcome.

Apr 05, 2024 11:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.