Modernization: I am fallowing https://docs.microsoft.com/en-us/sharepoint/dev/transform/modernize-userinterface-site-pages-powershell

Created on 7 Feb 2019  路  15Comments  路  Source: pnp/modernization

I am fallowing https://docs.microsoft.com/en-us/sharepoint/dev/transform/modernize-userinterface-site-pages-powershell
and getting error :

ConvertTo-PnPClientSidePage : Exception has been thrown by the target of an invocation.
At line:21 char:1

  • ConvertTo-PnPClientSidePage -Identity $page.FieldValues["FileLeafRef" ...
  • ~~~~~~~~~~~~~~~~~

    • CategoryInfo : WriteError: (:) [ConvertTo-PnPClientSidePage], TargetInvocationException

    • FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.ClientSidePages.ConvertToClientSidePage

pnpconvertto_pnpclientsidepage_error

question PageTransformationEngine PageTransformationPowerShell

All 15 comments

Hi @usharanipn ,

Can share the output of below commands immediately after you've received the error:

  • The output generated by calling Get-PnPException
  • The PnP PowerShell version. Run get-module -Name SharePointPnPPowerShellOnline and copy the version info

Also note that pages can only be transformed when they live in the sitepages library.

Page live in the sitepages library

Message : Exception has been thrown by the target of an invocation.
Stacktrace : at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig,
Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters,
Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder
binder, Object[] parameters, CultureInfo culture)
at SharePointPnP.Modernization.Framework.Functions.FunctionProcessor.ExecuteMethod(Object
functionClassInstance, FunctionDefinition functionDefinition, MethodInfo methodInfo)
at SharePointPnP.Modernization.Framework.Functions.FunctionProcessor.Process(WebPart&
webPartData, WebPartEntity webPart)
at SharePointPnP.Modernization.Framework.Transform.ContentTransformator.Transform(List`1
webParts)
at SharePointPnP.Modernization.Framework.Transform.PageTransformator.Transform(PageTransformation
Information pageTransformationInformation)
at SharePointPnP.PowerShell.Commands.ClientSidePages.ConvertToClientSidePage.ExecuteCmdlet()
at SharePointPnP.PowerShell.Commands.PnPCmdlet.ProcessRecord()
ScriptLineNumber : 21

Name : SharePointPnPPowerShellOnline
Path : Drive:\Users\username\AppData\Local\Apps\SharePointPnPPowerShellOnline\Modules\SharePointPnPPowerSh
ellOnline\SharePointPnP.PowerShell.Online.Commands.dll
Description : SharePoint Patterns and Practices PowerShell Cmdlets for SharePoint Online
Guid : 8f1147be-a8e4-4bd2-a705-841d5334edc0
Version : 3.5.1901.0
ModuleBase : Drive:\Users\username\AppData\Local\Apps\SharePointPnPPowerShellOnline\Modules\SharePointPnPPowerSh
ellOnline
ModuleType : Binary
PrivateData : {PSData}
AccessMode : ReadWrite
ExportedAliases : {[Add-PnPPnPProvisioningSubSite, Add-PnPPnPProvisioningSubSite], [Add-PnPProvisioningSequence,
Add-PnPProvisioningSequence], [Add-PnPProvisioningSite, Add-PnPProvisioningSite],
[Apply-PnPProvisioningHierarchy, Apply-PnPProvisioningHierarchy]...}
ExportedCmdlets : {[Add-PnPApp, Add-PnPApp], [Add-PnPClientSidePage, Add-PnPClientSidePage],
[Add-PnPClientSidePageSection, Add-PnPClientSidePageSection], [Add-PnPClientSideText,
Add-PnPClientSideText]...}
ExportedFunctions : {}
ExportedVariables : {}
NestedModules : {}

We used to have an issue with pages living in the root site collection of the tenant. Is this page living in the root site collection? Does have an XLSTListViewWebPart on it? Do other pages transform OK?

Can you share the output of get-module -Name SharePointPnPPowerShellOnline

Yes for both questions. In Root level Simple Wiki page or site page transforming but if the sitepage contains XLSTListViewWebPart then throwing error .

If sitepage in site collection and sitepage contains XLSTListViewWebPart getting error

ConvertTo-PnPClientSidePage : Column 'CanvasContent1' does not exist. It may have been deleted by another user.
/sites/ven1/SitePages
At line:21 char:1

  • ConvertTo-PnPClientSidePage -Identity $page.FieldValues["FileLeafRef" ...
  • ~~~~~~~~~~~~~~~~~

    • CategoryInfo : WriteError: (:) [ConvertTo-PnPClientSidePage], ServerException

    • FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.ClientSidePages.ConvertToClientSidePage

If sitepage in sitecollection and site page contains nothing giving error below
Modernizing Normal_Page.aspx ...
ConvertTo-PnPClientSidePage : Column 'ClientSideApplicationId' does not exist. It may have been deleted by another
user. /sites/ven1/SitePages
At line:21 char:1

  • ConvertTo-PnPClientSidePage -Identity $page.FieldValues["FileLeafRef" ...
  • ~~~~~~~~~~~~~~~~~

    • CategoryInfo : WriteError: (:) [ConvertTo-PnPClientSidePage], ServerException

    • FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.ClientSidePages.ConvertToClientSidePage

PS C:\windows\system32> get-module -Name SharePointPnPPowerShellOnline

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 3.5.1901.0 SharePointPnPPowerShellOnline {Add-PnPApp, Add-PnPClientSidePage, Add-PnPClientSidePageS...

Your issue should be fixed in the Feb release, which will come out by next week Monday

Hi @usharanipn,

The February version has been released. Please follow the update instructions in here https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps#updating to get the latest and then retry your scenario. The probem should be resolved, hence I'm closing this is issue. If you still see that problem then please re-open this issue or create a new one.

I fallowed the above url for connect to my tenant still same errors as above

I have the same problem.
I am on version:
Version : 3.10.1906.0

and I am getting the error:

ConvertTo-PnPClientSidePage : Column 'CanvasContent1' does not exist. It may have been deleted by another user. /SitePages
At line:1 char:1

  • ConvertTo-PnPClientSidePage -Identity "home.aspx" -overwrite
  • ~~~~~~~~~~~~

    • CategoryInfo : WriteError: (:) [ConvertTo-PnPClientSidePage], ServerException

    • FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.ClientSidePages.ConvertToClientSidePage

This is the home page at the very top level of the site collection for our tenant, too.

I'm having the same issue for Home page modernization. Could you please help us to resolve this issue?

Hi @jansenbe, Could you please check this issue?

@jansenbe, tried page transformation today for the first time and I encounter this very error as well. However, not for alle sites that I want to modernize the classic homepage for.
Get-PnPField for the Site Pages library actually shows me that this column does not exist for the affected site collections. Might there be a site or site collection feature that is required for this column to be created?

Thanks.

@colonelclaypoo can you try:
Site settings > Manage Site Features,
Then ensure 2 features are enabled:

  1. "site pages"
  2. "sharepoint server publishing".

I sometimes get errors when modernising pages and a lot of the time, enabling these 2 features solves them.

I wish it was a microsoft employee giving this guidance and not me..... but here we are

@colonelclaypoo can you try:
Site settings > Manage Site Features,
Then ensure 2 features are enabled:

  1. "site pages"
  2. "sharepoint server publishing".

I sometimes get errors when modernising pages and a lot of the time, enabling these 2 features solves them.

I wish it was a microsoft employee giving this guidance and not me..... but here we are

Thanks, that did the trick.

@jansenbe are you seeing this? would be nice if this issue could be taken up by someone who is _actually employed by microsoft_................................ Whether that means clarifying the PNP exception, updating the documentation, any action really.
You have been receiving a lot of feedback on this active issue which you closed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicolas6969 picture nicolas6969  路  3Comments

rudfoss picture rudfoss  路  4Comments

adamtoad picture adamtoad  路  8Comments

colonelclaypoo picture colonelclaypoo  路  5Comments

pkbullock picture pkbullock  路  7Comments