Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, November 30, 2012 8:57 PM
Consider this scenario:
- A Content Hub is in use and content types are published to a subscriber site.
- I add the subscribed Content Type to a library. Works fine.
- Under Settings for the library, I click the newly added content type. I choose the "Delete" option. I receive the following error:
The content type "MyContentType" at "/MySubsite/MyLibrary" is read only.
I am unable to remove the content type from the library (there are no files in the library). I can delete the entire library and start over, but how can we remove read-only content types from a library after they are applied?
Thanks for you help!
All replies (11)
Thursday, December 6, 2012 6:38 PM ✅Answered | 1 vote
check this also:
http://msdn.microsoft.com/en-us/library/ms453791(v=office.14).aspx
Thanks; sounds like a bug, though.
Not being able to remove a content type from a library is pretty annoying.
Monday, April 8, 2013 5:05 PM ✅Answered | 1 vote
Thanks for all of the replies.
Yes, the content type is set to Read Only because it is part of a content hub subscription. HOWEVER, I am not trying to delete the content type itself, rather only remove it from use within a specific library from where it has been attached. You should be able to remove a read only content type from a library; so this is definitely a bug.
SNiku, your script is the closest, but not quite accurate as you'd need to attach to the list and set the ReadOnly property to false, then delete it. I wasn't able to code this out correctly within 10 minutes, so I ended up using SharePoint Manager 2010 to expand down to the item, set the ReadOnly property to False, then was able to delete the content type from the library.
Monday, December 3, 2012 5:29 AM
Hello,
Please try once by PowerShell scripts.
Thanks! BR, Prasham http://prashamsabadra.blogspot.in/
Monday, December 3, 2012 8:03 AM
check this also:
http://msdn.microsoft.com/en-us/library/ms453791(v=office.14).aspx
Saturday, March 9, 2013 12:52 AM
Looks like the property of content type is set to not deletable. Try changing this using PowerShell to enable to Delete button. The script can be foudn in this URL:
Monday, June 3, 2013 11:00 PM | 10 votes
Just ran into the same issue. The content type is defined in the hub, where it is NOT set to read only, but at the library level it appears as read only, nonetheless.
Here is how to solve it via the browser interface, no Powershell, no code.
Document Library Settings > Select the content type > You will see two items under Settings, "Advanced settings" and "Delete this content type".
First click "Advanced settings". Here you can see that the content type is set to read only at this level. Select "No" and OK. Select OK in the message dialog.
Now you see a lot more commands in the Settings sections. Select "Delete this content type" and it will actually be deleted.
cheers, teylyn
www.teylyn.com
Thursday, August 22, 2013 3:33 PM
I had several congtent types which had been added via Content Hub Subscription. I wanted them gone. I tried a couple of the suggestions mentioned
here, but in the end only one solution worked: open the site in SharePoint Designer, navigate to the target content type. You will see this:
SETTINGS
[ ] Allow modifications
Once you check that box, you should be able to delete the content type.
______________ Aaron Hamilton
Thursday, May 15, 2014 2:02 PM
Thanks teylyn, I should've pay more attention. Simply solved :)
Wednesday, September 2, 2015 10:11 PM
If you use PowerShell, you should be able to set the ReadOnly to false before calling your delete. Assuming you already have an instance list you are working with, you can use the following code:
$contentType = $list.ContentTypes["contentTypeName"]
$contentType.ReadOnly = $false
$list.ContentTypes.Delete[$contentType.Id]
Tuesday, August 2, 2016 12:43 AM
That worked!
Wednesday, November 23, 2016 7:02 PM
Thanks teylyn