You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue isn't fixed yet (1.8.0 version). I can confirm that Sections can not be removed.
There is an issue in the class PnP.Core.Model.SharePoint.Page
......
private readonly List<CanvasSection> sections = new List<CanvasSection>(1);
public List<ICanvasSection> Sections
{
get
{
return sections.Cast<ICanvasSection>().ToList();
}
}
......
The Sections property returns a copy (new reference) of private variable sections . The code $pg.Sections.RemoveAt($i) doesn't actually remove Section object from private variable sections.
Also this issue affects ConvertTo-PnPPage command. The parameter RemoveEmptySectionsAndColumns does nothing.
Reporting an Issue or Missing Feature
Issue
Expected behavior
It removes the sections of the page.
Actual behavior
Sections of the page still persists. No error thrown. I tried a test where the Home page has 2 sections. And it prints out
1
and then0
.Steps to reproduce behavior
What is the version of the Cmdlet module you are running?
Manifest 1.7.0 PnP.PowerShell
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: