The 'AllowDeletion' attribute is not declared.

Ola Hansson
Ola Hansson used Ask the Experts™
For two days, I've been trying to get on to creating SiteTemplates in SharePoint 2016. When I'm creating the template, I get the error message as saying. "The 'AllowDeletion' attribute is not declared.". It comes from  SiteCoumns that I inserted them into SiteCollection. I have opened the cab file from wsp and then find fields containing attributes such as <FieldRef ID = "{23c92184-aa69-47ed-8685-2a9e7ac66c86}" Name = "ArendeType" AllowDeletion = "TRUE" /> All columns and content types were created in the same SiteCollection.

Is there enyone that can help me on this. This is a section of the ElementsContentType.xml file in the cabfile for the site template (wsp-file)

<ContentType ID="0x010100E24BBAB22E21AB4BB8CA45C9D77AA9B9" Name="PDSAdvokat" Group="PDSAdvokat" Overwrite="TRUE">
            <Folder TargetName="_cts/PDSAdvokat" />
                  <FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" />
                  <FieldRef ID="{5f47e085-2150-41dc-b661-442f3027f552}" Name="SelectFilename" />
                  <FieldRef ID="{8553196d-ec8d-4564-9861-3dbe931050c8}" Name="FileLeafRef" Required="TRUE" />
                  <FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Name="Created" Hidden="TRUE" />
                  <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" Required="FALSE" ShowInNewForm="FALSE" ShowInEditForm="TRUE" />
                  <FieldRef ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Name="Modified" Hidden="TRUE" />
                  <FieldRef ID="{822c78e3-1ea9-4943-b449-57863ad33ca9}" Name="Modified_x0020_By" Hidden="FALSE" />
                  <FieldRef ID="{4dd7e525-8d6b-4cb4-9d3e-44ee25f973eb}" Name="Created_x0020_By" Hidden="FALSE" />
                  <FieldRef ID="{3b41b3d0-79ee-493a-a651-17030bc35e4e}" Name="Ansvarig" AllowDeletion="TRUE" />
                  <FieldRef ID="{d2894275-a868-4b46-a829-0a2fe7f9f95b}" Name="AnsvarigArende" AllowDeletion="TRUE" />
                  <FieldRef ID="{373ed99b-8dbd-4c4a-8177-b3f509804ccf}" Name="ArendeInformation" AllowDeletion="TRUE" />
                  <FieldRef ID="{a56295bf-0b59-4fc2-88af-5a739137650d}" Name="DatumSidhuvud" AllowDeletion="TRUE" />
                  <FieldRef ID="{308f4465-fed1-4db3-9234-8e61acb51c84}" Name="Dokumentklass" AllowDeletion="TRUE" />
                  <FieldRef ID="{4b1a5e00-d153-400c-bdfc-97b4eb7885f5}" Name="GDPRDokument" AllowDeletion="TRUE" />
                  <FieldRef ID="{6fbb8d82-c983-4bbb-b6e5-6dbfee9059b1}" Name="Klient" AllowDeletion="TRUE" />
                  <FieldRef ID="{426dd544-3d2e-4294-b0d5-753bf49b748b}" Name="KlientNr" AllowDeletion="TRUE" />
                  <FieldRef ID="{96922544-a3ed-409f-b880-4b4936e1bafa}" Name="KM_x0020_dokument" AllowDeletion="TRUE" />
                  <FieldRef ID="{6200977b-f186-4018-9929-f4dedc5c6cec}" Name="Arende" AllowDeletion="TRUE" />
                  <FieldRef ID="{b2ae9fcd-dd4b-444b-8577-8f6f87a17350}" Name="ArendeNr" AllowDeletion="TRUE" />
                  <FieldRef ID="{23c92184-aa69-47ed-8685-2a9e7ac66c86}" Name="ArendeTyp" AllowDeletion="TRUE" />

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Kyle SantosSoftware Test Analyst I at Dassault Systemes


I am here to help you with your open question.  Do you still need help?  I have the ability to alert more experts if you still need help.

If you solved the problem on your own, would you please post the solution here in case others have the same problem?

If you need me to delete this question just say "Delete."

Thank you for using Experts Exchange.


Kyle Santos
Customer Relations
I got the anser that this is a bug in SP and the solution is to open the wsp file and delete the attribute Allow delete. This is from my point of view not a solution and the problem has ben since 2013 so Microsoft chame on you.

Kyle SantosSoftware Test Analyst I at Dassault Systemes

Thank you for letting us know!
Ola HanssonDeveloper


This is a work around and not a real solution.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial