Skip to content

Cannot reference Site Collection columns on when running a Site Design on a Subsite #3333

@Mlavieri

Description

@Mlavieri

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

When applying a Site Design on a subsite any columns available to the site should be able to be used in a Site Design.

Observed Behavior

When applying a Site Design to a sub site that creates a content type with a reference to a Site Column the design will fail with an error that "One or more of the properties on this action has an invalid type." Additionally if this script also creates a column a duplicate column will be created at the subsite level.

image

Steps to Reproduce

  1. Create a Site Design that creates a column and a content type such as the following

{
"$schema": "schema.json",
"actions": [
{
"verb": "createSiteColumn",
"fieldType": "Text",
"internalName": "mattsColumn",
"displayName": "Matt's Column",
"isRequired": false,
"group": "A"
},
{
"verb": "createContentType",
"name": "Matt's CT",
"parentName": "Item",
"hidden": false,
"subactions": [
{
"verb": "addSiteColumn",
"internalName": "mattsColumn"
}
]
}
]
}

  1. Apply the Site Design to a Site
  2. Create a subsite under the site the design was applied to in step 2.
    4a. Run the Site Design on the Subsite
    4b. Alternatively create a new Site Design that only creates a content type referencing the parent column

{
"$schema": "schema.json",
"actions": [
{
"verb": "createContentType",
"name": "Matt's Sub CT",
"parentName": "Item",
"hidden": false,
"subactions": [
{
"verb": "addSiteColumn",
"internalName": "mattsColumn"
}
]
}
]
}

Thanks for your contribution! Sharing is caring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:site-designCategory: Site Designs/Site Scriptsstatus:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active worktype:bug-confirmedConfirmed bug, not working as designed / expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions