pnp / PnP-PowerShell

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

Cannot convert classic page and export to site page lib on different site on same tenant #2388

Open Alper2 opened 4 years ago

Alper2 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:

  1. Are you using Apply-SPOProvisioningTemplate or Get-SPOProvisioningTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/OfficeDev/PnP-PowerShell/tree/master/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/officedev/PnP-Sites-Core/issues

Reporting an Issue or Missing Feature

Converting classic page to modern, and exporting them to a different site page collection in the same tenant.

Expected behavior

Converted classic pages to modern, exported to a different site page library in the same tenant

Actual behavior

Error message: ConvertTo-PnPClientSidePage : Cannot contact site at the specified URL https://myTenant.sharepoint.com/sites/test/SitePages/Forms/ByAuthor.aspx. There is no Web named "/sites/ test/SitePages/Forms/ByAuthor.aspx/_vti_bin/sites.asmx". At line:1 char:1

Steps to reproduce behavior

First I connect to my classic site where the classic pages are located: Connect-PnPOnline -Url https://myTenantsharepoint.com/sites/classic/

I use the command to convert the page to modern, target the classic page, and use the "TargetWebUrl" to point where the modern pages should be stored:

ConvertTo-PnPClientSidePage -Identity ny.aspx -Overwrite -TargetWebUrl https://myTenant.sharepoint.com/sites/test/SitePages/Forms/ByAuthor.aspx

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

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

3.16.19.

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.

ToddKlindt commented 4 years ago

If you just specify just the site to -TargetWebUrl does it work? (remove the library and view part, '/SitePages/Forms/ByAuthor.aspx')

ConvertTo-PnPClientSidePage -Identity ny.aspx -Overwrite -TargetWebUrl https://myTenant.sharepoint.com/sites/test/

tk

pkbullock commented 4 years ago

Hi @Alper2, like @ToddKlindt mentioned the modernisation tooling does not convert forms just pages. If you continue having issues, please report the fault to https://github.com/SharePoint/sp-dev-modernization/issues repo.