Web Part added using Add-PnPWebPartToWebPartPage is not visible on SharePoint Page in SP 2013

Copper Contributor

I have added custom/OOB web part to an page using: -

Add-PnPWebPartToWebPartPage -ServerRelativePageUrl $pageUrl -Path $webPartPath  -ZoneId "wpz" -ZoneIndex 0.

 

There is no error and the command is getting executed properly.  After that I checked web parts on the page using following command: -

Get-PnPWebPart -ServerRelativePageUrl $pageUrl

 

As per response of above command new web part is added sucessfully on page.

 

But when I visited the page the web part is not visible there.

 

Also when I open the page in SharePoint Designer I was able to see web part there.

 

While adding the web part I have taken care of File Check-in and Check-out.

 

When I add the same custom/OOB web part through UI after editing the page the web part is visible.

 

Could any one please let me know why I am not able to see web part on the page which I added through Add-PnPWebPartToWebPartPage.

 

3 Replies

have you tried adding ?content=1 to your page url? so that you can check in the web part page maintenance page if the web part is there?

Yes, I have tried adding ?content=1. Web Part was not there. But when I open the page using SharePoint Designer the web part was there.

@Pradeep Thorat 

 

I know this post is some what old, but I am currently also running into this same issue on SP2016, was this ever resolved?  Thanks for any assistance.

 

v/r

JShidell