pnp / sp-dev-site-scripts

Repository for sample SharePoint site designs and site scripts

Home Page:https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"joinHubSite" and assign to HubSite generates infinite loop

KalleMansikkaniemi opened this issue · comments

Category

  • Question
  • Bug
  • Enhancement

Expected or Desired Behavior

Would it be great that when HubSite is starting the site script containing the verb "joinHubSite", it just ignores the verb, because it is already joined a HubSite?

Observed Behavior

When a site design containing a script with "joinHubSite" verb is connected to HubSite it generates an infinite loop.

Steps to Reproduce

Powershell:
Set-SPOHubSite https://yourtenant.sharepoint.com/sites/hubsite -Title "HubSite" -SiteDesignId "xxx"

JSON:
"verb": "joinHubSite", "hubSiteId": "yyy", "name": "HubSite"

This is a question I have asked myself numerous times (although I haven't gotten around to test it yet)
In practice this means that as of now we have to implement two different Site Designs for this to work without side effects, one with and one without "joinHubSite"-verb specified :-(