none
Error saving site as template: BDCField not allowed / Site Column with external data RRS feed

  • Question

  • System: SharePoint 2013

    Summary: We implemented a site column with external data (Blog Post) and now, we cannot save sites as template, resp. we cannnot acivate them. “Error saving site as template: BDCField not allowed”.

    BUT: Delete the site column doesn’t make it work again! It still does not work although I deleted the site column!

     Now, at the whole site collection we cannot save our Project templates!

     I reproduced this on several site collections. It doesn’t matter if the external site column is used or not. Just configuring the external site column creates the error. And it cannot be undone.

    I can find this error also for Moss 2007 and SharePoint 2010 – but I cannot find any solution!

     Any idea?

    In Detail:

    Problem: Error saving site as template: BDCField not allowed

           Save Site as template:
                 
            Unexpected Error; Korrelations-ID: 3f01e59d-19be-c0e9-e62b-1c944d5b6cad;

            Solution Catalog: Template existing, not activated!  https://..../_layouts/15/start.aspx#/_catalogs/solutions/Forms/AllItems.aspx

            Trying to activate Solution: Error Korrelations-ID: ac01e59d-d905-c0e9-e62b-12c6f572995d
              „The 'BdcField' attribute is not allowed
           

    Detailed Error Logging:

    Getting Error Message for Exception System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.SharePoint.SPException: Fehler bei der Überprüfung der Featuredefinition mit der ID 'f2d536f4-4de8-42d6-be08-5948151a2a48', Datei 'Vorlage 12ListInstances\ElementsFields.xml', Zeile 1122, Zeichen 53.: The 'BdcField' attribute is not allowed.   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.FeatureXmlValidationCallback.XmlValidationCallBack(Object sender, ValidationEventArgs evtargs)   

     at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String arg)   

     at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo)   

     at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String localName, String namespaceUri, XmlValueGetter attributeValue, XmlSchemaInfo schemaInfo)   

     at System.Xml.XsdValidatingReader.ValidateAttributes()   

     at System.Xml.XsdValidatingReader.ProcessElementEvent()   

     at System.Xml.XsdValidatingReader.Read()   

     at System.Xml.XmlReader.MoveToContent()   

     at System.Xml.XmlReader.IsStartElement()   

     at Microsoft.SharePoint.Utilities.SPUtility.XsdValidateXml(XmlTextReader xmlStreamReader, String friendlyName, String pathXsdFile, String tagExpectedRootNode, Int32 desiredPathVersion, ValidationEventHandler xsdValEventHandler)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.SolutionFile.ValidateFeatureXmlFile(String rootTagElement)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElementsCore(XmlNodeList nodeList, String strFeatureDirRelativeToCabFile, Guid featureId, Dictionary`2 filesAdded)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElements(XmlNode root, String strFeatureDirRelativeToCabFile, String strFeatureXmlFilename, Guid featureId)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.WspSolutionFeature.ProcessFeatureXml()   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.InitSolutionFeatures(XmlNode root)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.ProcessSolutionManifest()   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.Load()   

     at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.CreateSolutionPackage(SPRequest request, String name, String signature, Byte[] fileBytes)   

     at Microsoft.SharePoint.SPUserSolutionCollection.<>c__DisplayClass4.<AddOrUpgrade>b__0()   

     at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)   

     at Microsoft.SharePoint.SPUserSolutionCollection.AddOrUpgrade(SPListItem item, SPUserSolution existingSolution)   

     at Microsoft.SharePoint.SPUserSolutionCollection.Add(Int32 solutionGalleryItemId)   

     at Microsoft.SharePoint.WebControls.SolutionItemButton.ActivateItem()   

     at Microsoft.SharePoint.WebControls.SPLinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)   

     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   

     at System.Web.UI.Page.HandleError(Exception e)   

     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   

     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   

     at System.Web.UI.Page.ProcessRequest()   

     at System.Web.UI.Page.ProcessRequest(HttpContext context)   

     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   

     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     

    Application error when access /sites/TEST_Vorlage/_catalogs/solutions/Forms/Activate.aspx, Error=Fehler bei der Überprüfung der Featuredefinition mit der ID 'f2d536f4-4de8-42d6-be08-5948151a2a48', Datei 'Vorlage 12ListInstances\ElementsFields.xml', Zeile 1122, Zeichen 53.: The 'BdcField' attribute is not allowed. 

     at Microsoft.SharePoint.Administration.SPSolutionPackage.FeatureXmlValidationCallback.XmlValidationCallBack(Object sender, ValidationEventArgs evtargs)   

     at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String arg)   

     at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo)   

     at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String localName, String namespaceUri, XmlValueGetter attributeValue, XmlSchemaInfo schemaInfo)   

     at System.Xml.XsdValidatingReader.ValidateAttributes()   

     at System.Xml.XsdValidatingReader.ProcessElementEvent()   

     at System.Xml.XsdValidatingReader.Read()   

     at System.Xml.XmlReader.MoveToContent()   

     at System.Xml.XmlReader.IsStartElement()   

     at Microsoft.SharePoint.Utilities.SPUtility.XsdValidateXml(XmlTextReader xmlStreamReader, String friendlyName, String pathXsdFile, String tagExpectedRootNode, Int32 desiredPathVersion, ValidationEventHandler xsdValEventHandler)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.SolutionFile.ValidateFeatureXmlFile(String rootTagElement)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElementsCore(XmlNodeList nodeList, String strFeatureDirRelativeToCabFile, Guid featureId, Dictionary`2 filesAdded)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElements(XmlNode root, String strFeatureDirRelativeToCabFile, String strFeatureXmlFilename, Guid featureId)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.WspSolutionFeature.ProcessFeatureXml()   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.InitSolutionFeatures(XmlNode root)   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.ProcessSolutionManifest()   

     at Microsoft.SharePoint.Administration.SPSolutionPackage.Load()   

     at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.CreateSolutionPackage(SPRequest request, String name, String signature, Byte[] fileBytes)   

     at Microsoft.SharePoint.SPUserSolutionCollection.<>c__DisplayClass4.<AddOrUpgrade>b__0()   

     at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)   

     at Microsoft.SharePoint.SPUserSolutionCollection.AddOrUpgrade(SPListItem item, SPUserSolution existingSolution)   

     at Microsoft.SharePoint.SPUserSolutionCollection.Add(Int32 solutionGalleryItemId)   

     at Microsoft.SharePoint.WebControls.SolutionItemButton.ActivateItem()   

     at Microsoft.SharePoint.WebControls.SPLinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)   

     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

     

    Reason: Site Column with External Data

    Site Column with external data not possible => Workaround implemented as described in these blog posts:

                  http://www.cedricascoop.be/blog/2010/05/17/site-column-with-external-data

                  https://blog.netnerds.net/2011/08/sharepoint-2010-create-site-column-based-on-external-data

    Saving site as template is possible until the above described workaround is implemented.

    I reproduced this scenario on several site collections. It doesn’t matter if the site column is used or not. Just configuring the external site column creates the error.

    BUT: Delete the site column doesn’t make it work again! It still does not work although I deleted the site column!

    I can find the error for MOSS 2007, SharePoint 2010, SharePoint 2013… But no solution!

    Question: How can this Setting be “undone“?

    Delete site column doesn’t fix error. Save site as Template resp. activate the site template is still not possible.

    Any Idea??!?

    We already searched for orphan settings but the log shows zero orphans.

    (http://netsharepoint.blogspot.de/2013/11/orphans-object-clean-up-in-sharepoint.html)

    Wednesday, April 5, 2017 1:15 PM

All replies

  • Summary: We implemented a site column with external data (Blog Post) and now, we cannot save sites as template, resp. we cannnot acivate them. “Error saving site as template: BDCField not allowed”.

    BUT: Delete the site column doesn’t make it work again! It still does not work although I deleted the site column!

     Now, at the whole site collection we cannot save our Project templates!

     I reproduced this on several site collections. It doesn’t matter if the external site column is used or not. Just configuring the external site column creates the error. And it cannot be undone.

    I can find this error also for Moss 2007 and SharePoint 2010 – but I cannot find any solution!

     Any idea?

    In Detail:

    Problem: Error saving site as template: BDCField not allowed

           Save Site as template:
                 
            Unexpected Error; Korrelations-ID: 3f01e59d-19be-c0e9-e62b-1c944d5b6cad;

            Solution Catalog: Template existing, not activated!  https://..../_layouts/15/start.aspx#/_catalogs/solutions/Forms/AllItems.aspx

            Trying to activate Solution: Error Korrelations-ID: ac01e59d-d905-c0e9-e62b-12c6f572995d
              „The 'BdcField' attribute is not allowed
           

    Reason: Site Column with External Data

    Site Column with external data not possible => Workaround implemented as described in these blog posts:

                  http://www.cedricascoop.be/blog/2010/05/17/site-column-with-external-data

                  https://blog.netnerds.net/2011/08/sharepoint-2010-create-site-column-based-on-external-data

    Saving site as template is possible until the above described workaround is implemented.

    I reproduced this scenario on several site collections. It doesn’t matter if the site column is used or not. Just configuring the external site column creates the error.

    BUT: Delete the site column doesn’t make it work again! It still does not work although I deleted the site column!

    I can find the error for MOSS 2007, SharePoint 2010, SharePoint 2013… But no solution!

    Question: How can this Setting be “undone“?

    Delete site column doesn’t fix error. Save site as Template resp. activate the site template is still not possible.

    Any Idea??!?

    We already searched for orphan settings but the log shows zero orphans.

    (http://netsharepoint.blogspot.de/2013/11/orphans-object-clean-up-in-sharepoint.html)

    Wednesday, April 5, 2017 1:40 PM
  • Hello SimoneF,

    did you checked all the settings of the SPSite/SPWeb via the API/CSOM?

    I would guess that a hidden feature, field or property bag settings is the root cause.

    BR,
    HoschyH

    Wednesday, April 5, 2017 5:48 PM
  • Hi SimoneF,

    It is the limitation, site level columns against an external list is not supported.

    For this issue, add the following lines in the wss.xsd file and before the line “<xs:anyAttribute namespace="##other" processContents="lax" />”. And then Performed an IISRESET.

    Note: The wss.xsd file in SharePoint 2013 located at c:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML.

    It is possible that you need to add it two time.

        <xs:attribute name="BdcField" type="xs:string" />
    
        <xs:attribute name="SystemInstance" type="xs:string" />
    
        <xs:attribute name="EntityNamespace" type="xs:string" />
    
        <xs:attribute name="EntityName" type="xs:string" />
    
        <xs:attribute name="Profile" type="xs:string" />
    
        <xs:attribute name="HasActions" type="xs:string" />
    
        <xs:attribute name="SecondaryFieldBdcNames" type="xs:string" />
    
        <xs:attribute name="SecondaryFieldWssNames" type="xs:string" />
    
        <xs:attribute name="RelatedFieldBDCField" type="xs:string" />
    
        <xs:attribute name="RelatedFieldWssStaticName" type="xs:string" />
    
        <xs:attribute name="SecondaryFieldsWssStaticNames" type="xs:string" />
    
        <xs:attribute name="AddFieldOption" type="xs:string" />
    
        <xs:attribute name="RelatedField" type="xs:string" />


    After this, we should be able to save the site as a template without the issue.

    Best Regards,

    Linda Zhang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, April 6, 2017 9:53 AM
    Moderator
  • Hi SimoneF,

    Does the suggestion resolve your issue?

    If the reply helps you, please mark it as answer to help other users who meet the same issue in this forum.

    Thanks,

    Linda Zhang


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, April 12, 2017 9:05 AM
    Moderator
  • Wait - may I confirm this: A representative of Microsoft TechNet is saying to modify the database directly??  NO, DON'T - from every Microsoft rep we've worked with (senior technical staff), they claim that any support is voided if you have touched your DB at all.  You call in for a MSFT ticket, they say, "Sorry, no can do."

    I ran into this same problem today and in the XML there are Sealed Hidden columns representing the BCS entity.  While I don't have a simple fix, I'm pretty sure all you would have to do is to remove those fields from the xml.  So, steps such as this:

    - Download .wsp from solutions gallery
    - Rename to .cab
    - Extract all files
    - Modify ElementsFields.xml
    - Remove the 2 or more columns ("Field" elements) which reference BdcField attribute; save
    - Re-cab up all the files that you extracted, including the changed ElementsFields.xml (there are command line tools out there to do this)
    - Rename .cab to .wsp
    - Upload to Solutions Gallery
    - Attempt to activate

    Note I haven't tried this yet (for this example) but I have in the past modified a site template WSP in this manner.

    - Sue -

    Wednesday, September 13, 2017 8:12 PM
  • Hi Sue,

    Sorry, it is not recommended to modify the database directly.

    Please check the thread post by same user below, and try to use the method in the reply to check if it works.

    https://social.msdn.microsoft.com/Forums/office/en-US/042519fd-b67d-4393-b711-db39918573d9/error-saving-site-as-template-bdcfield-not-allowed-site-column-with-external-data?forum=sharepointgeneral

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, September 14, 2017 2:08 AM
    Moderator