pnp / sp-dev-site-scripts

Repository for sample SharePoint site designs and site scripts
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview
MIT License
160 stars 68 forks source link

"joinHubSite" and assign to HubSite generates infinite loop #20

Open KalleMansikkaniemi opened 5 years ago

KalleMansikkaniemi commented 5 years ago

Category

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"

balle3201 commented 5 years ago

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 :-(