Open eBehbahani opened 6 years ago
Hi Guys, did anyone found any solution ? I am also having the same problem.
Any solution found for this yet?
Any Ideas? Same problem for me.
I think I got this working a while ago, but I'm not exactly sure what I had to change. Extract of working code below:
Add-PnPClientSidePageSection -Page $PageName -SectionTemplate OneColumnFullWidth -Order 1 -ZoneEmphasis 2
# Hero
Add-PnPClientSideWebPart -Page $PageName -DefaultWebPartType Hero -WebPartProperties ($global:heroProperties | ConvertTo-Json -Depth 10) -Section 1 -Column 1 -Order 1
Set-PnPClientSidePage -Identity $PageName -CommentsEnabled:$false
Set-PnPFileCheckedIn -Url $pageServerRelativeUrl -CheckinType MajorCheckIn
Set-PnPClientSidePage -Identity $PageName -Publish -LayoutType Home
It could be that performing a major check in on the site page file allowed me to then publish it. Hope this helps!
I recently started experimenting with the full-width webparts and deploying them via powershell. I'm seeing the same issue as @AriGunawan from issue #1304 after having installed the latest verison of SharePoint PnP PowerShell (ver. 3.1.1809.0).
Category
[x] Bug [ ] Enhancement
Environment
[x] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013
Expected or Desired Behavior
The desired behavior is that the modern client side page gets published with all webparts and webpart properties set.
Observed Behavior
What I see instead is the following error when running the script:
Set-PnPClientSidePage : You cannot host this web part inside a one column full width section, only webparts that support full bleed are allowed
When I navigate to the page that has been created, I see all the webparts and webpart properties have been set, but the page has not been published. I can manually publish through the UI though.Steps to Reproduce
"supportsFullBleed": true
$pageName = "Test.aspx"
Connect-PnPOnline –Url $targetWebUrl –UseWebLogin
$page = Add-PnPClientSidePage -Name $pageName -LayoutType Home
Add-PnPClientSidePageSection -Page $page -SectionTemplate OneColumnFullWidth
Add-PnPClientSideWebPart -Page $page -Section 1 -Column 1 -Component TestWebpart
Set-PnPClientSidePage -Identity $pageName -CommentsEnabled:$false -Publish
Set-PnPClientSidePage