modernization icon indicating copy to clipboard operation
modernization copied to clipboard

Can not convert a publishing page to modern page using powershell

Open virender-gupta1 opened this issue 3 years ago • 1 comments

Thank you for reporting a bug. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you. Thanks!

Problem Area

[ ] Page Transformation: Error during the use of page transformation from PnP PowerShell

Expected or Desired Behavior

I am trying to convert classic publishing page to modern pages using ConvertTo-PnPPage command and page layout mapping file. I want to add a people webpart in the modern page based on the Publishing Contact field. The pusblishing page does not have the contact field webpart and people webpart is not supported in field "targetwebpart" property, i tried to add it in the fixed webpart section. But its giving below error

Observed Behavior

ConvertTo-PnPPage : Parameter PersonEmail was used but is not listed as a web part property that can be used.

Steps to Reproduce

Powershell command used (replaced actual values)

ConvertTo-PnPPage -PublishingPage -Identity "page.aspx" -Overwrite -TargetWebUrl targetsite -PageLayoutMapping filepath

Below is the page layout mapping

virender-gupta1 avatar Jun 07 '22 06:06 virender-gupta1

Below is the page layout mapping

[PowershellMappingFile.txt](https://github.com/pnp/modernization/files/8850701/PowershellMappingFile.txt)

virender-gupta1 avatar Jun 07 '22 06:06 virender-gupta1