[BUG] Convert the classic SharePoint page to modern SharePoint page #3202
Unanswered
gustavorost
asked this question in
General
Replies: 3 comments 3 replies
-
@gustavorost - Please update the module to the latest (you'll need PS |
Beta Was this translation helpful? Give feedback.
3 replies
-
Same issue here :( |
Beta Was this translation helpful? Give feedback.
0 replies
-
I get the same error with one page I'm trying to convert. Also from SharePoint 2016. I'm using PnP.PowerShell version 2.99.117. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Expected behavior
My expectation is to convert the classic SharePoint page to modern SharePoint page
Actual behavior
I can´t convert the page using the ConvertTo-PnPPage command
Steps to reproduce behavior
I´m using the custom code below that I created using PnP Framework
$SiteURL = "https://my-domain.sharepoint.com/sites/my_site"
Connect-PnPOnline $SiteURL -Interactive
$Pages = Get-PnPListItem -List SitePages
Try {
ForEach ($Page in $Pages) {
$PageName = $Page.FieldValues.FileLeafRef
Write-host "Converting Page:"$PageName
}
Catch {
write-host -f Red "Error Converting Clasic Page to Modern!" $_.Exception.Message
}
When I run this command I receive the error message below
"Error Converting Clasic Page to Modern! 'I' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositionInLine: 628."
Anyone knows how we can fix this issue or to convert a classic basic page to the modern page?
What is the version of the Cmdlet module you are running?
1.12.0 PnP.PowerShell
Which operating system/environment are you running PnP PowerShell on?
Beta Was this translation helpful? Give feedback.
All reactions