pnp / PnP-Sites-Core

Microsoft 365 Dev PnP Core component (.NET) targeted for increasing developer productivity with CSOM based solutions.
Other
416 stars 643 forks source link

Adding client side web part to single column layout on team site #1477

Closed raymondlittle100 closed 6 years ago

raymondlittle100 commented 6 years ago

I was using the PnP Sites Core Microsoft.SharePointOnline.CSOM NuGet package to test adding a custom SPFx web part to a modern page with single column, however it errors with the details below

"You can't use a OneColumnFullWidth zone in this site template (STS)"

Category

[ ] Bug

Environment

[ ] Office 365 / SharePoint Online

jansenbe commented 6 years ago

OneColumnFullWidth is only allowed on communication sites...do you see the issue on a communication site? If yes, what's the version you're using?

raymondlittle100 commented 6 years ago

Thanks for the response.

Is that a specific PnP rule or does it have a wider reason? I have a team site and I have created modern pages on this. One of these pages is setup with a one column section and a web part in this. I am trying to programmatically update this web part but i get this error.

jansenbe commented 6 years ago

On team sites you would use all except the OneColumnFullWidth section type. The reason is alignment with the UI: on a team site you can't choose the OneColumnFullWidth section type from the UI, while this does work on communication sites.

raymondlittle100 commented 6 years ago

I never specifically selected this layout it was the one that was there by default. Interestingly I updated the SharePointPnPCoreOnline NuGet package to 2.18.1709 and that now seems to let me update with the same page without any errors

jansenbe commented 6 years ago

There was indeed an error fixed for this, but that was already a while ago. Good it's then resolved. Will close this issue now.