Forum Discussion
ca_rem
Jul 30, 2019Brass Contributor
Can't delete content types?
I on Content Type Hub, I can't delete some content types. These Content Types used in some List Templates I create. I deleted all these template already, and every list, every content type relate t...
- Jul 30, 2019I ran into this error quite a lot and every time I forgot to empty my Recycle Bin, especially forgot to look at the "Deleted from end user Recycle Bin" view which is only available to you if you are a Site Collection Administrator...
You said you're on you Content Type Hub. Have you published the Content Types in question? If so, you could try to Unpublish them first (in my experience this shouldn't really matter though and I just tried on the site I've helped you with earlier...)
SpoTech
Aug 20, 2021Copper Contributor
For M365 group sites, you will need to have scripting enabled at the tenant level. It might take up to 24 hours to take effect. If after doing so you still can't delete content types or template files within, you might need to turn on scripting on the specific site. Here's the https://docs.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script?redirectSourcePath=%252fen-us%252farticle%252fTurn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f#to-allow-custom-script-on-other-sharepoint-sites describing how to do so.
Here's the PowerShell scrip for quick reference:
Set-SPOSite <SiteURL> -DenyAddAndCustomizePages 0
Or for PnP.PowerShell
Set-PnPSite <SiteURL> -NoScriptSite $false