pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
990 stars 663 forks source link

Several cmdlets for managing client side pages fails with 'Object reference not set to an instance of an object' #1951

Open ChrisAV81 opened 5 years ago

ChrisAV81 commented 5 years ago

Reporting an Issue or Missing Feature

Several cmdlets for managing client side pages has stopped working and throws Object reference not set to an instance of an object. It doesn't happen if the page was created through PnP PowerShell, but it fails for all pages created or modified through the SharePoint UI.

Expected behavior

Set-PnPClientSidePage, Get-PnPClientSidePage, Add-PnPClientSideWebPart should work even if the page has been created or edited in the SharePoint UI.

Actual behavior

The cmdles return the following exception: Get-PnPClientSidePage : Object reference not set to an instance of an object. At line:1 char:1

Examples of cmdlets that fails with this exception:

Set-PnPClientSIdePage -Identity "TEST3" -Name "test10" Add-PnPClientSideWebPart -Page "TEST3" -DefaultWebPartType BingMap Get-PnPClientSidePage -Identity "TEST3"

Steps to reproduce behavior

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

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

3.6.1902.2

How did you install the PnP-PowerShell Cmdlets?

kachihro commented 5 years ago

I'm having the exact same problem - with some 'older' pages - created in May-2019. Brand-new pages in July-2019 do not have the same problem. Either there's a property in the page that's EXPECTED by the PS script/object - or something else that's changed...

I've tried with older versions of PNP PowerShell as well.