Modernization: ConvertTo-PnPClientSidePage - no output and does nothing

Created on 27 Sep 2019  路  21Comments  路  Source: pnp/modernization

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

Running command:
ConvertTo-PnPClientSidePage -Identity "news-testing-future-date.aspx" -PublishingPage -TargetConnection $target -LogVerbose -LogType File -LogFolder c:\temp

Should generate some output in the log file and create a page on the target SPO site.

Observed Behavior

No new page is created and nothing is logged in the log file at all.

Steps to Reproduce

$target = Connect-PnPOnline https://tenant.sharepoint.com/sites/site/modernization -UseWebLogin -ReturnConnection

Connect-PnPOnline https://sharepoint.domain.com/news -CurrentCredentials

ConvertTo-PnPClientSidePage -Identity "news-testing-future-date.aspx" -PublishingPage -TargetConnection $target -LogVerbose -LogType File -LogFolder c:\temp

Submission Guidelines

question PageTransformationEngine Pending feedback

All 21 comments

@danmyhre , what version are you using from PnP PS? What's the on-premises SharePoint version you're using?

I've tried your scenario in my lab and I'm not able to repro the issue. Can you call Get-PnPException after ConvertTo-PnPClientSidePage cmdlet and see if that results in errors?

image

I have the following version installed:
3.13.1909.0

Nothing in Get-PnPException

On-prem SharePoint is 2013

Hi @danmyhre ,

The fact that nothing happens is really strange.

Can you try the following:

  • Check if there's no other SharePoint PnP modules loaded?
Get-Module -Name "SharePointPnPPowerShellOnline" -All
  • Connect to your on-premises site with PnP PowerShell and then lookup the ID of the page that fails and grab and share the contents of the WikiField
$p = Get-PnPListItem -List sitepages -Id $id
$p.FieldValues["WikiField"] | clip

Hi both,

Can you confirm if you are transforming into a Team Site, noticed the target URL is a Su site of a modern site?
Is the source a publishing page?
Does this occur on all pages?

I have seen rare cases where certain errors occur in the past don鈥檛 get reported or logged. E.g closed web parts think did this. We maybe hitting new edge case here.

Only the 1 version of the module exists - 3.13.1909.0

There is nothing in the "WikiField" property on the source, it is publishing page. The content of the page exists in a field called "NewsBody"

Yes, was trying to go into a sub-site of a site collection.

I'll try a few other pages as well...

I tried against a normal team site homepage (SitePages/Home.aspx) and that seemed to process and I did receive logs, so this issue is only with publishing pages.

Missed the fact it was a publishing page, wikifield obviously does not exist there.

All of the publishing pages show this problem? Is this the root site collection or a regular one under a managed path (e.g. /sites or /teams)?

Source is a sub-web within the root site collection

Do you happen to have another publishing portal which is not a root site collection to test with. Would like to verify if it's root site collection related. We've fixed an issue with asset transformation on sub webs of the root site a couple of days ago.

I'll spin one up, will report back soon

That worked - it successfully created the page in SPO. I went from a subsite in SPS to a subsite in SPO.

Source: https://sharepoint.domain.com/sites/Test-Publishing/News (publishing site)
Destination: https://tenant.sharepoint.com/sites/site/modernization

Alright...then there's something with the sub site of the root web. The current dev build I just tested does handle this correctly (in my lab). By Monday next week latest we'll release the October version which will contain fixes for root site collection handling. Still it bothers me that you're not getting a single error or log output...meaning as long as we're not able to repro the issue we can't ensure things will work with the October version.

Can you try to pass in a non existing page name and see if you get an error when working on the root site collection? Also does the same problem also occur for pages in the root web of the root site collection?

image

With a non-existent source page

  • no log file was produced at all

  • Received an error in PowerShell: ConvertTo-PnPClientSidePage : Object reference not set to an instance of an object.

So this issue is there for all pages on that particular sub site? Do you have pages in other sub sites that you can test? Or pages in the root web of that publishing portal?

I tried using a test page in the root web of the root site collection and it has the same issue of not migrating and producing no output in the log.

Hi @danmyhre ,

I've noticed that the log flushing logic could potentially not run...so I'm wrapping that in a try/finally block so it's always ran...this change will be part of the October release which will come out on Monday. Would recommend testing with that version, hoping that we now at least get a log telling us what went wrong.

Would that work for you?

Also would cross check that in case you've used the -LogSkipFlush parameter that you do flush the log at the end of the run.

Yes, I will try it again and report back once the new version is released. Thanks!

Same result with 3.14.1910.0

HI @danmyhre ,

I'm puzzled...is it possible to have an online meeting so that I can try to troubleshoot this together with you?

Thank you very much for your time today! The root cause of no logging or migration being performed turned out to be not have site collection admin level permissions on the on-premises SP site. Previously, permission level was 'Read'. Once SCA level was added, the process began to work and the log file was generated.

Was this page helpful?
0 / 5 - 0 ratings