-
Notifications
You must be signed in to change notification settings - Fork 217
Description
Category
- Bug
Describe the bug
All I want to do is save a page. If the page header was removed it will add it back.
Steps to reproduce
I'm using PnP PowerShell 2.12.0 but the issue is in the .Save of the Page
- Get a page: $page = Get-PnPPage -Identity "My-Title.aspx"
- Save the page
Write-Host "Saving Page"
$page.Save()
$page.Publish("Content Updated by: $User")
Write-Host "Saved Page"
Here I remove all the webparts + page header, add only 1 OOTB text editor, get the page, save then publish and the header will come right back.
https://github.com/user-attachments/assets/1d3c986c-4eb5-4d1e-bd3d-a60b748f09e6
Even stranger behavior is if I empty the page, save + publish it - it will add the header back AND when you click edit the entire page is like the default home page.
2024-10-10_08-56-09.mp4
Expected behavior
I would expect the page header to be in the exact same status that it was before the .Save()
Environment details (development & target environment)
- SDK version: PnP PowerShell 2.12.0 [the version that is tied with this]
- OS: Windows 11
- SDK used in: PowerShell 7.0 terminal
- Framework: .NET Core
- Browser(s): Chrome
- Tooling: PowerShell 7.0
- Additional details: using the latest stable PowerShell 2.12.0
Additional context
no additional details
Thanks for your contribution! Sharing is caring.

