Skip to content

Managed Metadata Site Columns Break after Multiple Applications of the Same Site Design / Site Script #4115

@sympmarc

Description

@sympmarc

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

In a Site Design / Site Script which creates Managed Metadata Site Columns, adds them to a Content Type, and applies the Content Type to a list or library, we should be able to run the Site Design multiple times on the same site - generally as the IA is tuned.

See #3967

Observed Behavior

The first time the Site Design / Site Script is applied to the site, the Site Columns are created just fine and can be used in the list / library.

On subsequent applications of the Site Design / Site Script, the Managed Metadata columns in the list / library stop working correctly, with the error "The SPListItem being updated was not retrieved with all taxonomy fields". See image below.
image

Steps to Reproduce

Apply a Site Design that does something like the following. The first time, all is well. On subsequent application, the Managed Metadata Site Columns are broken, as above.

{
    "$schema": "schema.json",
    "actions": [
        {
            "verb": "createSiteColumnXml",
            "schemaXml": "<Field Type='TaxonomyFieldTypeMulti' DisplayName='Applications' ShowField='Term1033' Required='FALSE' EnforceUniqueValues='FALSE' Group='_Inside Unum' ID='{579a42af-412c-4738-9147-1810e081ed0f}' StaticName='Applications' Name='Applications' Mult='TRUE' Sortable='FALSE' AllowDeletion='TRUE'><Default /><Customization><ArrayOfProperty><Property><Name>SspId</Name><Value xmlns:q1='http://www.w3.org/2001/XMLSchema' p4:type='q1:string' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>84f19f70-0639-4973-b12f-85ff832335c4</Value></Property><Property><Name>GroupId</Name></Property><Property><Name>TermSetId</Name><Value xmlns:q2='http://www.w3.org/2001/XMLSchema' p4:type='q2:string' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>72d688ae-53a9-482c-9af3-a03b0cef1530</Value></Property><Property><Name>AnchorId</Name><Value xmlns:q3='http://www.w3.org/2001/XMLSchema' p4:type='q3:string' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>00000000-0000-0000-0000-000000000000</Value></Property><Property><Name>UserCreated</Name><Value xmlns:q4='http://www.w3.org/2001/XMLSchema' p4:type='q4:boolean' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>false</Value></Property><Property><Name>Open</Name><Value xmlns:q5='http://www.w3.org/2001/XMLSchema' p4:type='q5:boolean' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>false</Value></Property><Property><Name>IsPathRendered</Name><Value xmlns:q7='http://www.w3.org/2001/XMLSchema' p4:type='q7:boolean' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>false</Value></Property><Property><Name>IsKeyword</Name><Value xmlns:q8='http://www.w3.org/2001/XMLSchema' p4:type='q8:boolean' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>false</Value></Property><Property><Name>TargetTemplate</Name></Property><Property><Name>CreateValuesInEditForm</Name><Value xmlns:q9='http://www.w3.org/2001/XMLSchema' p4:type='q9:boolean' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>false</Value></Property><Property><Name>FilterAssemblyStrongName</Name><Value xmlns:q10='http://www.w3.org/2001/XMLSchema' p4:type='q10:string' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>Microsoft.SharePoint.Taxonomy, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Value></Property><Property><Name>FilterClassName</Name><Value xmlns:q11='http://www.w3.org/2001/XMLSchema' p4:type='q11:string' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>Microsoft.SharePoint.Taxonomy.TaxonomyField</Value></Property><Property><Name>FilterMethodName</Name><Value xmlns:q12='http://www.w3.org/2001/XMLSchema' p4:type='q12:string' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>GetFilteringHtml</Value></Property><Property><Name>FilterJavascriptProperty</Name><Value xmlns:q13='http://www.w3.org/2001/XMLSchema' p4:type='q13:string' xmlns:p4='http://www.w3.org/2001/XMLSchema-instance'>FilteringJavascript</Value></Property></ArrayOfProperty></Customization></Field>",
            "pushChanges": true
        },
        {
            "verb": "createContentType",
            "name": "Special Document",
            "description": "Special Document",
            "parentName": "Document",
            "id": "0x010100CF6AA253BAF93A47B3CD1B70650DABEF",
            "group": "_My Group",
            "hidden": false,
            "subactions": [
                {
                    "verb": "addSiteColumn",
                    "internalName": "Applications"
                }
            ]
        },
        {
            "verb": "createSPList",
            "listName": "Special Documents",
            "templateType": 101,
            "subactions": [
                {
                    "verb": "addContentType",
                    "name": "Special Document"
                }
            ]
        }
    ]
}

@bcameron1231 @BobGerman @seansquires

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:site-designCategory: Site Designs/Site Scriptstype:archive-old-issueIssues which are closed as tool old for active worktype:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions