pnp / modernization

All modernization tooling and guidance
http://aka.ms/sppnp-modernize
MIT License
156 stars 86 forks source link

Can not convert a publishing page to modern page using powershell #630

Open virender-gupta1 opened 2 years ago

virender-gupta1 commented 2 years ago

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

<?xml version="1.0" encoding="utf-8"?>

virender-gupta1 commented 2 years ago

Below is the page layout mapping

<?xml version="1.0" encoding="utf-8"?>

PowershellMappingFile.txt