modernization: SP2013 to SPO ConvertTo-PnPClientSidePage Error - "ExportMode" does not exist

Category

[ X ] Bug [ ] Enhancement

Problem Area

[ X ] Page Transformation: Error during the use of page transformation from PnP PowerShell

Expected or Desired Behavior

Expecting to get modernised page in target SPO site.

Observed Behavior

Migrating SP2013 team sites to SPO and getting errors when trying to modernise the pages. Seems the same as Issue #251

Steps to Reproduce

$modPage = ConvertTo-PnPClientSidePage -Identity $pageName -Overwrite -TargetConnection $global:destPnPConnection -LogVerbose -LogType File -LogFolder $mLogFolder -SkipItemLevelPermissionCopyToClientSidePage -CopyPageMetadata -KeepPageCreationModificationInformation -Folder $folder;

Submission Guidelines

Page-Transformation-Report-14-02-2020-10-21-40-AM.txt

  • If you checked the “Page Transformation: Error during the use of page transformation from PnP PowerShell” checkbox then please provide:
    • The output you see in your PowerShell session - verbose output attached
    • The output generated by calling Get-PnPException - none
    • The PnP PowerShell version. Run get-module -Name SharePointPnPPowerShellOnline and copy the version info Major Minor Build Revision

3 18 2002 0

Thanks for your contribution! Sharing is caring.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Thanks for the feedback @paylord , good to see you’re unblocked. Will close this issue, but obviously it will stay here for future reference in case someone else bumps into the same issue.

Using the hosts file entry to force me onto the WFE with no redirects means I get a response to the /vti_pvt/service.cnf endpoint and also pages with web parts get modernized - whoohooo.

In case you are interested, I got one of the farm admins to try the endpoint using the server:port combo and they also got no access message - including from a server and using a service account.

Once again, really appreciate you guys quickly responding and helping me to understand where the problem was. I guess not everyone will have the luxury of a separate WFE so the workaround suggested still sounds like a good idea to me - though luckily in my case I am not in a hurry for it 😃

If there is anything I can do to assist further with your understanding of the circumstances please let me know.

Thank you and keep up the great work!

Dave

@pkbullock @jansenbe I understand the support approach which is why I appreciate you guys jumping on it so quickly - and why I wanted to explain I was going quiet for a while 😃

Thinking about it overnight I do have another potential thing to try but will have to wait until Monday now. I believe the client has a 3rd WFE that is not part of their standard load balancing and therefore does not have the IIS redirect applied. If I can amend my local hosts file to force connection to this WFE then that may resolve the issue.

However, the concept you guys describe above certainly sounds like a winner. While I am not a .NET developer I am guessing it is using the service.cnf call to get the spVersion - if that call fails then the IF statement is never true and so is defaulting to SPO. Your suggestion above is to alter the code slightly to use a cached value of spVersion which then gives me the ability to adjust it with PowerShell - very nice!

Hey @paylord ,

Thanks for using page transformation and providing feedback. I’ll try to repro the issue you’re seeing with the exportmode property.

Regarding the KeepPageCreationModificationInformation: when you do a transformation from on-prem to online we’ll try to automatically translate user id’s as the way user’s are defined in on-prem SharePoint is different than in SPO. The automatic mapping however does not always give correct results and in those cases you do have the option to use a custom user mapping file. Can you check https://docs.microsoft.com/en-us/sharepoint/dev/transform/modernize-userinterface-site-pages-usermapping and see if that helps.

Also note that if you publish or post the created modern page this again will reset the user modified, this is by design. The dates and user created however should stay the same.