Modernization: No valid pagelayout transformation model could be retrieved for publishing page layout

Created on 17 Sep 2019  路  9Comments  路  Source: pnp/modernization

Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you. Thanks!

Category

[X ] Bug
[ ] Enhancement

Problem Area

[ ] Page Transformation: Error during the setup/use of the Page Transformation UI solution (did you check our troubleshooting guide?)
[X] Page Transformation: Error during the use of page transformation from PnP PowerShell
[ ] Page Transformation: Error during the use of page transformation from .Net
[ ] Page Transformation: Page is not looking correct after transformation
[ ] Modernization Scanner: something went wrong...

Expected or Desired Behavior

Expected Behavior of the Bug is Page should be transformed to modern page without any issues

Observed Behavior

Transforming a Publishing page from On-Prem(SP2013) to SPO tenant

Steps to Reproduce

Executing the PS1 script Convert-OnPremPublishingPages.ps1,since the export-PnPClientSidePageMapping did not generate the mapping file,I have generated it manually for my custom page layout.

Tested by created a page at root site collection with this page layout and migrated it,the transformation worked successfully.However if I try to access the publishing pages located under the Subsite created with same page layout is throwing the error.

Powershell version-
3.13.1909.0

Modernisation Summary Report

Date | Duration | Source Page | Target Page Url | Status
------------- | ------------- | ------------- | ------------- | -------------
17/09/2019 5:12:14 PM | 00:00:01 | /news/pages/testpage.aspx | | A issue prevented successful transformation

Errors during transformation

Date | Source Page | Operation | Message
------------- | ------------- | ------------- | -------------
17/09/2019 5:12:15 PM | /news/pages/testpage.aspx | Page Layout Manager | No valid pagelayout transformation model could be retrieved for publishing page layout Custom%20%Page%Layout
17/09/2019 5:12:15 PM | /news/pages/testpage.aspx | Summary | A critical error occurred - transformation did not complete at SharePointPnP.Modernization.Framework.Publishing.PageLayoutManager.GetPageLayoutMappingModel(PublishingPageTransformation publishingPageTransformation, ListItem page)
at SharePointPnP.Modernization.Framework.Publishing.PublishingPageTransformator.Transform(PublishingPageTransformationInformation publishingPageTransformationInformation)

Critical Errors during transformation

17/09/2019 5:12:15 PM - /news/pages/testpage.aspx

_No valid pagelayout transformation model could be retrieved for publishing page layout Custom%20%Page%Layout at SharePointPnP.Modernization.Framework.Publishing.PageLayoutManager.GetPageLayoutMappingModel(PublishingPageTransformation publishingPageTransformation, ListItem page)
at SharePointPnP.Modernization.Framework.Publishing.PublishingPageTransformator.Transform(PublishingPageTransformationInformation publishingPageTransformationInformation)_

Individual Page details

Transformation Details: /news/pages/testpage.aspx

  • Report date: 17/09/2019 5:12:14 PM
  • Transform duration: SharePointPnP.Modernization.Framework.Entities.TransformationLogAnalysis
  • Transforming site: http://my.company.com/News
  • Cross-Site transfer mode to site: https://company.sharepoint.com/sites/TestSite
  • Transforming page: /news/pages/testpage.aspx
  • A critical error occurred - transformation did not complete

Page Transformation Settings

Property | Setting
------------- | -------------
Overwrite | True
Target Page Name | Migrated_testpage.aspx
Keep Page Specific Permissions | False
Remove Empty Sections And Columns | True
Handle Wiki Images And Videos | True
Add Table List Image As Image Web Part | False
Publish Created Page | True
Disable Page Comments | False
Skip Url Rewrite | False
Skip Default Url Rewrite | False
Url Mapping File |
Skip Telemetry | False

Transformation Operation Details

Date | Operation | Actions Performed
------------- | ------------- | -------------
17/09/2019 5:12:14 PM | _Input Validation_ | _Validation checks complete_
17/09/2019 5:12:14 PM | _SharePoint Connection_ | _Loading client context objects_
17/09/2019 5:12:14 PM | _SharePoint Connection_ | _Loading target client context object_
17/09/2019 5:12:14 PM | _Page Creation_ | _Detect if the page is living inside a folder_
17/09/2019 5:12:14 PM | _Page Creation_ | _Just try to load the page in the fastest possible manner, we only want to see if the page exists or not_
17/09/2019 5:12:15 PM | Load | Page does not exist in current web
17/09/2019 5:12:15 PM | Page Creation | Checking Page Exists
17/09/2019 5:12:15 PM | Page Creation | Modern page created
17/09/2019 5:12:15 PM | Article page handling | Transforming source page as Article page
17/09/2019 5:12:15 PM | Article page handling | Recognized source page as a Publishing Page. - Analyzing web parts and page layouts
17/09/2019 5:12:15 PM | Page Layout Manager | Page uses Custom%20%Page%Layout as page layout, no mapping was provided so auto generating a mapping

Infact,I did provide the pagelayout mapping file as below

ConvertTo-PnPClientSidePage -Identity "testpage.aspx" -PublishingPage
-TargetConnection $targetConnection -PublishingTargetPageName "Migrated_testpage.aspx"
-PageLayoutMapping "C:\Intranet\Migration\pagelayoutmapping.xml" -Connection $sourceConnection
-Overwrite -SkipItemLevelPermissionCopyToClientSidePage
-LogType File -CopyPageMetadata
-LogFolder $LogOutputFolder `
-LogVerbose

question PageTransformationEngine Pending feedback

All 9 comments

Hi @KVSolutions ,

The error indicates that the page you're transforming is using a page layout named Custom%20%Page%Layout ... do you use that name in your page layout mapping file? Can you share the mapping file you're using?

Hi Jansen,
I have actually used my page layout name,when posting here,I changed that name in the error log.I`ve used the right name during the transformation

Hi @KVSolutions ,

I've just tried to provision a page with a custom page layout living in a 2013 publishing portal sub site to SPO and this worked fine. Let me also try this with a root site collection

A page with a custom layout in a sub site of a publishing portal in the root of the SP2103 web app (https://portal2013.pnp.com/sub1 in my case) also works fine.

Would recommend cross checking the value set as custom page layout (should be the log file) and the names used in your publishing mapping file. Feel free to share both the full log and the mapping file to [email protected] so I can have a look.

The behavior I observed the above error with below steps

  1. Edit the published page on Prem and discard the checkout
  2. Try to migrate the page with Convert-OnPremPublishingPages.ps1 script and its throwing the errors as in the log file.

Sent you the log file and my custom mapping file to [email protected]

Looking at the logs I seems there are 2 issues:

  • The lookup of the pagelayout fails
  • You've a content editor web part pointing to a file which can't be loaded

I'll do some more testing and will report back

The content editor file load will now not fail anymore in case a file could not be loaded...will be part of the October version.

About not finding the page layout: I noticed that the page layout name we return is SG%20Intraportal%20News%20Article%20Page whereas in your mapping file you're using SG Intraportal News Article Page.

Can you update your mapping like this shown in below snippet and see if that fixes things for you (note the AlsoAppliesTo attribute).

<PageLayout Name="SG Intraportal News Article Page" AlsoAppliesTo="SG%20Intraportal%20News%20Article%20Page" AssociatedContentType="" PageLayoutTemplate="AutoDetect" PageHeader="Custom">

Hi @jansenbe

Thanks for your tip and it did worked,1% got failed after this and I updated to Oct release as well.

This was very helpful! Thank you very much. I adjusted the Name attribute including %20 for blanks, then finally the converter picks up my custom.xml

Was this page helpful?
0 / 5 - 0 ratings