pnp / PnP-PowerShell

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

Convertto-PnpClientSidePage "File Not Found" Error #2361

Open eich0rn opened 4 years ago

eich0rn commented 4 years ago

Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:

Reporting an Issue or Missing Feature

Convertto-PnpClientSidePage failes with error "File Not Found" (Datei nicht gefunden) Maybe thats because there is no "SitePages" only "Seiten". (German tenant)

Expected behavior

Cmdlet should convert my pages to modern without error

Actual behavior

PS C:\Users\mmwadmin> ConvertTo-PnPClientSidePage -Identity $page.FieldValues["FileLeafRef"] -Overwrite ConvertTo-PnPClientSidePage : Datei nicht gefunden. In Zeile:1 Zeichen:1

Steps to reproduce behavior

I execute the following line before the error: Connect-PnPOnline -Url https://xxxxxxxxx.sharepoint.com/sites/KnowledgeBase $seiten = get-pnplist -Identity Seiten $pages = Get-PnPListItem -List $seiten foreach($page in $pages) { if ($page.FieldValues["ClientSideApplicationId"] -eq "b6917cb1-93a0-4b97-a84d-7cf49975d4ec" ) { Write-Host "Page " $page.FieldValues["FileLeafRef"] " is modern, no need to modernize it again" } else {

Create a modern version of this page

        Write-Host "Modernizing " $page.FieldValues["FileLeafRef"] "..."
        $modernPage = ConvertTo-PnPClientSidePage -Identity $page.FieldValues["FileLeafRef"] -Overwrite
        Write-Host "Done" -ForegroundColor Green
    }

}

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

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

3.15.1911.0

How did you install the PnP-PowerShell Cmdlets?

ghost commented 4 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.