PnP-PowerShell icon indicating copy to clipboard operation
PnP-PowerShell copied to clipboard

Can not get LimitedWebPartManager from Page

Open jolscr opened this issue 6 years ago • 2 comments

Expected behavior

I will get the SPLimitedWebPartManager from a specific page to manage webpart connection.

Actual behavior

$file = Get-PnPFile -ServerRelativeUrl $pageRelativeUrl $file.GetLimitedWebPartManager([System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)

error: format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.

image

Steps to reproduce behavior

$file = Get-PnPFile -ServerRelativeUrl "/Wiki/Test.aspx" $file.GetLimitedWebPartManager([System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)

Which version of the PnP-PowerShell Cmdlets are you using?

  • [ ] PnP PowerShell for SharePoint 2013
  • [ ] PnP PowerShell for SharePoint 2016
  • [x ] PnP PowerShell for SharePoint 2019
  • [ ] PnP PowerShell for SharePoint Online

What is the version of the Cmdlet module you are running?

3.14.1910.1

How did you install the PnP-PowerShell Cmdlets?

  • [ ] MSI Installed downloaded from GitHub
  • [x ] Installed through the PowerShell Gallery with Install-Module
  • [ ] Other means

jolscr avatar Oct 24 '19 12:10 jolscr

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Oct 24 '19 12:10 ghost

I have the same behaviour with SPOnline.

thespooler avatar Nov 09 '20 17:11 thespooler