Closed DJ-RIT closed 4 years ago
I've been testing this and found that for so called v3 web parts (like the XsltListViewWebPart) that not all data was retrieved, hence the transformation process did not process this. After fixing this (will be part of the January release) by retrieving and parsing the page content to grab things like zoneId and controlId the transformation process has all the info it requires.
What comes next is important to understand: page transformation will not copy the lists, it will only handle pages. So if you for example have an XSLTListviewWebPart on a page pointing to "customlist1" and on the target site collection "customlist1" does not exist than the web part will not be put on the target page. It's recommended that you use migration tools to first copy the lists you still need from the source environment to the target environment.
Important: "Shared Documents" will automatically be replaced by "Documents" and "Calendar" will be automatically replaced by "Events" to better map to the default names in modern SPO sites.
If the list does exist on the target site, then it still might be the case that some web parts are not put on the target page as they do not have have modern equivalent. By looking at the default mapping you can see which XSLTListView web parts are mapped:
<Mapping Name="List" Default="true">
<ClientSideWebPart Type="List" Order="20" JsonControlData="{"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{},"links":{}},"dataVersion":"1.0","properties":{"isDocumentLibrary":false,"selectedListId":"{ListId}","listTitle":"{Title}","selectedListUrl":"{ListServerRelativeUrl}","webRelativeListUrl":"{ListWebRelativeUrl}","webpartHeightKey":4,"selectedViewId":"{ListViewId}","selectedFolderPath":"","hideCommandBar":{HideToolBar}}}" />
</Mapping>
<Mapping Name="Library" Default="false">
<ClientSideWebPart Type="List" Order="10" JsonControlData="{"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{},"links":{}},"dataVersion":"1.0","properties":{"isDocumentLibrary":true,"selectedListId":"{ListId}","listTitle":"{Title}","selectedListUrl":"{ListServerRelativeUrl}","webRelativeListUrl":"{ListWebRelativeUrl}","webpartHeightKey":4,"selectedViewId":"{ListViewId}","selectedFolderPath":"","hideCommandBar":{HideToolBar}}}" />
</Mapping>
<Mapping Name="Calendar" Default="false">
<ClientSideWebPart Type="Events" Order="10" JsonControlData="{"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{"title":""},"imageSources":{},"links":{"baseUrl":"{EncodedSiteCollectionUrl}"},"componentDependencies":{"layoutComponentId":"8ac0c53c-e8d0-4e3e-87d0-7449eb0d4027"}},"dataVersion":"1.0","properties":{"selectedListId":"{ListId}","selectedCategory":"","dateRangeOption":0,"startDate":"","endDate":"","isOnSeeAllPage":false,"layoutId":"FilmStrip","dataProviderId":"Event","webId":"{WebId}","siteId":"{SiteId}"}}"/>
</Mapping>
<Mapping Name="Issue" Default="false">
<ClientSideWebPart Type="List" Order="10" JsonControlData="{"serverProcessedContent":{"htmlStrings":{},"searchablePlainTexts":{},"imageSources":{},"links":{}},"dataVersion":"1.0","properties":{"isDocumentLibrary":false,"selectedListId":"{ListId}","listTitle":"{Title}","selectedListUrl":"{ListServerRelativeUrl}","webRelativeListUrl":"{ListWebRelativeUrl}","webpartHeightKey":4,"selectedViewId":"{ListViewId}","selectedFolderPath":"","hideCommandBar":{HideToolBar}}}" />
</Mapping>
<Mapping Name="TaskList" Default="false">
<ClientSideText Text="There's no OOB replacement for web part {Title}. Custom web parts might be helpfull here" Order="10"/>
</Mapping>
<Mapping Name="DiscussionBoard" Default="false">
<ClientSideText Text="There's no OOB replacement for web part {Title}. Custom web parts might be helpfull here" Order="10"/>
</Mapping>
<Mapping Name="Survey" Default="false">
<ClientSideText Text="There's no OOB replacement for web part {Title}. Custom web parts might be helpfull here" Order="10"/>
</Mapping>
<Mapping Name="Undefined" Default="false">
<ClientSideText Text="No mapping possible for web part {Title}" Order="10"/>
</Mapping>
So TaskList, DiscussionBoard and Survey web parts are not replaced as we've no modern version for them. You could plug in a custom developed alternative if you really depend on these web parts.
I would recommend trying the transformation again with the January release once available and start with the OOB webpartmapping file (simply don't specifying a webpartmapping argument will make the transformation use the default mapping).
Hi @DJ-RIT ,
Can you verify if things work with the January release?
Hi @DJ-RIT ,
Hope things are now working for you, if not then please let me know
Hi @jansenbe ,
apologies for not coming back earlier. We have just tested today on our site with the latest release but it still does not seem to work. We still get the same outcome as before - no web parts migrated but pictures.
I am attaching a migration test script for review - could you please support us if you have time and retrace it where we might have overlooked something?
migration test newscript COFIPL.zip
Let me know if you have any questions. Much appreciated!
Hi @DJ-RIT
With the ConvertClientSitePage.ps1 script could you add -LogVerbose ` to line 150 and re-run the transform, this gives use more diagnostic info about the problem?
Please post the MD output back here.
Thanks Paul
Hi @DJ-RIT ,
I appears that the web parts are not being recognized correctly, a set of properties are used to detect the type of web parts, these are not recognised.
Paul
Here we go, will this help please?
Ok thanks, it maybe early next week before i can look at this, will try sooner if possible.
To note: I found the types are coming back as "NonExportable_Unidentified" at https://github.com/SharePoint/sp-dev-modernization/blob/fe6e932598d9de0975291a7f153b962ad8869e01/Tools/SharePoint.Modernization/SharePointPnP.Modernization.Framework/Pages/BasePage.cs#L706
It maybe the web parts contain properties that are not being properly matched to their type for 2010 transformations. Will get back to you.
Paul
Paul
Can you cross check you're using the latest PS version? I've seen some folks having issues with updating PnP PowerShell. Can you run below script to check the loaded version:
$module = get-module -Name SharePointPnP.PowerShell.Online.Commands
$module | fl
Nevermind the above comment, looking in the log you shared I see Engine version | 1.0.2001.0
, so you're using the latest version. We'll need to look further:
Can you add -LogVerbose
to the ConvertTo-PnPClientSidePage
cmdlet in your script and share the verbose log output?
The -LogVerbose is in the attached zip file from yesterday.
Thanks for confirming that
Are you using anything specific for authenticating to SharePoint? Trying to rule out that the ASMX service calls fail. If you could do a Fiddler trace while transforming the page that fails I can see if the ASMX calls fail. Probably best to mail that directly to me (bjansen@microsoft.com) instead of adding it here
I've a SP2010 lab with a version that's older then yours in which I can transform xsltlistview web parts, so in theory this can work...so let's keep digging until we have it working for you as well.
I have managed to repo this and working on some code tweaks, PR coming soon, once i do bit more testing.
What's the root cause @pkbullock ? I can cross verify this in the fiddler trace + want to also repro this in my lab
We have slightly different implementations for web parts living in a web part zone vs inline web parts...might be related to this...
I can confirm that web part living in a web part zone are not correctly transformed. When the same web part lives in a html content field things work as expected. Most likely due to the 2 different implementations we have for web part property retrieval
Hi @jansenbe sorry for the delay, yes when the page uses web part zones in pages for example the BlankWebPartPage page layout, the XML properties retrieved for the web part are not exactly the same for other versions of SharePoint, so when we match properties to determine the type, it is not found.
I have made corrections to the code for this scenario, to restore conversion for supported web parts.
@DJ-RIT some web parts will not convert because they are not supported, like @jansenbe mentioned in this issue.
Will submit PR shortly and start testing.
@DJ-RIT : both @pkbullock and me could repro the issue and the change done by @pkbullock does fix the issue. This change has been committed and will be part of the February release which we'll release on either Feb 14 or Feb 17.
Fixing this one took longer than usual, but hope that as of the February release you'll be unblocked. Thanks for your testing and for the feedback you've provided.
@DJ-RIT : the February release is coming out today (or next week Monday latest)...I'm closing this issue, if you still have problems with that release then please create a new issue describing the new problem. Think it's easier that way.
We‘re currently working on a script that transforms SharePoint 2010 on-prem Wiki and Publishing pages to modern pages on SPO using the command ConvertTo-PnPClientSidePage. So far, we were successful with simple pages that contain text and images, however the web part mappings do not work (e.g. XSLT list view web part, document library web part,…).
We followed the guide from Bert Jansen, but so far we were not able to get the web part mapping to work and we really need this to migrate pages without manual touch up.
Attached you will find a complete example including screenshots and scripts. Any input/directions on how to tackle this issue is highly appreciated!
PowerShell Script + pagelayoutmapping + webpartmapping.pdf PowerShell.zip