Answered by:
Managed metadata colums are incorrectly added to a content type in the Schema; SharePoint Online; Save site as template

Question
-
I encountered this problem when trying to save my site as template in SharePoint Online.
I created a Managed Metadata column linked to my termstore and added this to a new content type based on a document.
When trying to save the site as template I encountered an Unexpected Error.
The template was sucessfully saved to the solution store, but could nog be activated.
While trying to activate it again i recieved this error:The validation of featuredefinition with id 16cfcf04-5543-4846-8b84-2ea93791ff5b has failed, file test2ListInstances\ElementsContentType.xml, line 2029, token 118: The 'AllowDeletion' attribute is not declared.
I downloaded the WSP, changed it to a CAB and opened the ElementsContentType.xml file and searched for the AllowDeletion attribute.
I found it at the <Fieldref> element for my content type.
I looked up the definition for the <Fieldref> element on MSDN (http://msdn.microsoft.com/en-us/library/office/aa543225(v=office.15).aspx) and discovered that the AllowDeletion attribute is indeed not declared.
Could this be what is preventing me from saving my site as a template?
(Disclaimer: I know that saving a site as a template is not the recommended way of doing this, but i have no other choice at this time)
- Edited by Renso Jacobs Wednesday, July 2, 2014 7:06 AM
Wednesday, July 2, 2014 7:01 AM
Answers
-
Hi All,
Thank you for replying on my question and trying to help!
I opened a ticket at Microsoft support last week and this afternoon they got back to me.
The issue is classified as a bug in SharePoint Online and it will be resolved in a upcoming patch. The engineer could not tell me when this path will be implemented, but he will notify me when it's done.There is no official workaround.
I solved it by importing the WSP in Visual Studio and removing the Allow Deletion part.
Not pretty, but it worked.
I will post back when the engineer has contacted me.
- Marked as answer by Renso Jacobs Monday, July 7, 2014 4:23 PM
Monday, July 7, 2014 4:22 PM
All replies
-
Hi Renso,
We're in a brand new greenfield site and I've hit the same problem. We're pushing out 3 content types from the SharePoint Online content type hub. Only a single site column (The out of the box Enterprise Keywords field) has been added to the content types.
When trying to save a sub-site of one of the site collections as a template, we're hitting the exact same problem.
Can you check your SPO build number by navigating to /_vti_pvt/service.cnf? We're running build number 16.0.0.1210
My work around at the moment is to remove the enterprise keywords column before creating the templates, and then re-inheriting the content type. But I have no content at this point in the project so that won't help people with existing sites & content.
Paul.
Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.
- Edited by Paul Hunt - CimaresMVP Wednesday, July 2, 2014 10:45 AM
Wednesday, July 2, 2014 8:36 AM -
Interesting that this error just began recently. I also have received the exact same error for the first time yesterday in our Tenant of SharePoint Online. In my case though I am not using a taxonomy field. The error message points to a drop-down field that is created as a site column. Below is a clip from the ElementsContentType.xml.
<ContentType ID="0x0101008F104E4616820F498AF45BEF6CD6A46B0208" Name="Const Project File-Labor" Group="DTSD Project Content Types" ReadOnly="TRUE" Overwrite="TRUE">
<Folder TargetName="_cts/Construction Project File-Labor" />
<FieldRefs>
<FieldRef ID="{8553196d-ec8d-4564-9861-3dbe931050c8}" Name="FileLeafRef" Required="TRUE" />
<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="FALSE" ShowInNewForm="FALSE" ShowInEditForm="TRUE" />
<FieldRef ID="{1a831e46-742f-43aa-b75a-7ea0b601acd4}" Name="Correspondence" Required="FALSE" Hidden="FALSE" ReadOnly="FALSE" PITarget="" PrimaryPITarget="" PIAttribute="" PrimaryPIAttribute="" Aggregation="" Node="" />
<FieldRef ID="{87833500-3a03-479d-974f-c97070b86a52}" Name="Sent_x002F_Received" Required="FALSE" Hidden="FALSE" ReadOnly="FALSE" PITarget="" PrimaryPITarget="" PIAttribute="" PrimaryPIAttribute="" Aggregation="" Node="" />
<FieldRef ID="{66c34b49-e5be-4753-aee1-31db648d5d68}" Name="Sent_x002F_Received_x0020_Date" />
<FieldRef ID="{5f47e085-2150-41dc-b661-442f3027f552}" Name="SelectFilename" />
<FieldRef ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Name="Modified" Hidden="TRUE" />
<FieldRef ID="{4dd7e525-8d6b-4cb4-9d3e-44ee25f973eb}" Name="Created_x0020_By" Hidden="FALSE" />
<FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" />
<FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Name="Created" Hidden="TRUE" />
<FieldRef ID="{822c78e3-1ea9-4943-b449-57863ad33ca9}" Name="Modified_x0020_By" Hidden="FALSE" />
<FieldRef ID="{ec2b9f3f-aaca-4b50-9309-3cd39b7bc8c2}" Name="Contract_x0020_ID" />
<FieldRef ID="{4cced9c1-65e9-46bd-8841-028372c217ab}" Name="Construction_x0020_Project_x0020_ID" Required="TRUE" Hidden="FALSE" ReadOnly="FALSE" PITarget="" PrimaryPITarget="" PIAttribute="" PrimaryPIAttribute="" Aggregation="" Node="" />
<FieldRef ID="{a5633085-47aa-4f74-92ba-9df3d8e4a295}" Name="Prime_x0020_Contractor" Required="TRUE" Hidden="FALSE" ReadOnly="FALSE" PITarget="" PrimaryPITarget="" PIAttribute="" PrimaryPIAttribute="" Aggregation="" Node="" />
<FieldRef ID="{2f07df99-e816-4c2e-b299-0c4e66877f52}" Name="Const-Project_x0020_File-Labor-Sub" AllowDeletion="TRUE" />
</FieldRefs>
<XmlDocuments>
<XmlDocument NamespaceURI="Microsoft.SharePoint.Taxonomy.ContentTypeSync">
<SharedContentType xmlns="Microsoft.SharePoint.Taxonomy.ContentTypeSync" SourceId="40b85f68-a44a-4d46-a778-c751385cb0c3" ContentTypeId="0x0101008F104E4616820F498AF45BEF6CD6A46B0208" PreviousValue="false" />
</XmlDocument>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<Display>DocumentLibraryForm</Display>
<Edit>DocumentLibraryForm</Edit>
<New>DocumentLibraryForm</New>
</FormTemplates>
</XmlDocument>
</XmlDocuments>
</ContentType>The content type is created in the content type hub and published to all my site collections. None of the site collections (that we have tested) are able to save then activate site templates successfully without this error.
The odd thing is that I have saved this exact site multiple times in the past, most recently on 6/23/2014.
I'm looking for any ideas of what has changed on SharePoint Online and looking for an explanation.
service.cnf reports 16.0.0.1210
Wednesday, July 2, 2014 12:18 PM -
It's looking like a recent release is a likely culprit. Can you please raise a service ticket in your tenancy Tom? The more that raise it, the quicker it will get fixed.
Paul.
Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.
Wednesday, July 2, 2014 12:23 PM -
We started having a very similar issue starting around 6/20/14. We had been using site templates with item content types so I know it was working fine. I had recently created a number of new content types, one with a MMD column. Then I began getting an error when trying to save a team site as a template - even a site with no customizations. The site would actually be in the solution gallery but when trying to activate it I would get the error ...."The AllowDeletion' attribute is not declared". The O365 help desk had me delete all my content types - ugh. Which initially fixed the problem. But as soon as I created another content type - EVEN when NOT applying it anywhere - the problem reoccurred. So far this issue has not been resolved and we're in a holding pattern.
Juliesan
Wednesday, July 2, 2014 1:58 PM -
This is also happening in another of my tenants on build 16.0.0.1205
Removing the content types is not an option once you have any amount of content in the site collection, so that's something I'll be resisting when support come back to me.
Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.
- Edited by Paul Hunt - CimaresMVP Wednesday, July 2, 2014 2:24 PM
Wednesday, July 2, 2014 2:21 PM -
I am having the same issue and will be opening a ticket tomorrow. Tennant Build 16.0.0.1215.
There is too much content to delete and recreate my Content Types as well.
treemtsma
Sunday, July 6, 2014 7:53 PM -
Hi All,
Thank you for replying on my question and trying to help!
I opened a ticket at Microsoft support last week and this afternoon they got back to me.
The issue is classified as a bug in SharePoint Online and it will be resolved in a upcoming patch. The engineer could not tell me when this path will be implemented, but he will notify me when it's done.There is no official workaround.
I solved it by importing the WSP in Visual Studio and removing the Allow Deletion part.
Not pretty, but it worked.
I will post back when the engineer has contacted me.
- Marked as answer by Renso Jacobs Monday, July 7, 2014 4:23 PM
Monday, July 7, 2014 4:22 PM -
Hi Renso,
Yep, just came off the phone from MS support with the same confirmation. Awaiting info on a hotfix. Until now the case stays open.
Paul.
Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.
Tuesday, July 8, 2014 10:34 AM -
Hi there. I cannot provide any help or advice, but just want to add one more irritated O365 customer to the growing list. This appears to be caused by a recent update as I was able to save the template only a week ago.
Symptoms are the same as described - solution saved but cannot be activated. But I don't seem to get any useful error message as poster. Mine just reports....
Sorry, something went wrongDon't worry. We're working hard to get this fixed. Please try again later.Correlation ID: a1bea29c-104c-1000-6bf2-0212d4e1c366
Date and Time: 8/07/2014 11:08:59 PM
Mike
Wednesday, July 9, 2014 6:10 AM -
Thanks Mike, I'd suggest that you raise a ticket through the support portal for your tenancy. Point them to this MSDN article too so that they know it's been looked at across multiple tenancies and replicated internally already.
By raising a ticket you should be further up the list for the hotfix when they bring it out.
Paul.
Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.
Wednesday, July 9, 2014 8:19 AM -
Hi Mike,
you can't see exact error when you are trying to "Save Site as Template". You need to open "Site Settings">"Solutions" (Solution Gallery) and try to activate particular Solution (Site Template) you saved there. At that moment you will be able to see exact cause of the error (file, row number, character number).
Dragan Panjkov [http://www.dragan-panjkov.com]
Wednesday, July 9, 2014 8:43 AM -
Hi All.
Just a quick update from the Microsoft Engineer:
Fixing this issue requires a code change and thereafter a product path. Since this involves a code fix, our internal procedures imposes this change to be tested in several environments before being deployed in production platform. From now the fix have been successfully applied in development.
From the information I collect from product group, we are expecting to globally deploy this fix during next week.
Looks like good news.
I'll keep you updated.
Thursday, July 10, 2014 9:11 AM -
Hi All,
Good news. The patch that should fix this error is now globally installed.
Could you guys try if the save site as template function works again?
Thursday, July 17, 2014 6:24 AM