pnp / modernization

All modernization tooling and guidance

Home Page:http://aka.ms/sppnp-modernize

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Community Script Editor "Not Found" and never added to transformed pages

gabrielbray opened this issue · comments

Problem Area

[ ] Page Transformation: Error during the use of page transformation from PnP PowerShell
[ ] Page Transformation: Error during the use of page transformation from .Net
[x] Page Transformation: Page is not looking correct after transformation
[ ] Modernization Scanner: something went wrong...

Expected or Desired Behavior

Insert the modern community script editor web part, via the <FixedWebParts> node, during the classic publishing page transformation process. Note- I'm referencing a classic script editor web part within the above mentioned node in hopes of triggering the mapping...maybe this is the wrong approach to begin with?

Observed Behavior

Classic publishing page transformation completes as expected, minus the presence of the modern community script editor web part which isn't inserted into the transformed page. A warning in the generated log file indicates "Modern web part not found".

Steps to Reproduce

  1. Classic SharePoint publishing site hosted in Microsoft 365 (source)

  2. Modern communication site hosted in Microsoft 365 (destination)

  3. Attached files - Convert-PublishingPages.ps1; webpartmapping.xml; pagelayoutmapping.xml.
    webpartmapping.zip

  4. The custom page layout in question is <PageLayout Name="EnterpriseWikiCustom" ... >

  5. Follow these instructions to install the community script editor and set the required flag on the PnP PowerShell cmdlet. Once the community script editor is deployed to the app catalog (I tried both site collection and tenant), add the app to the modern communication site so it's visible in site contents.

  6. Run the PowerShell script via .\Convert-PublishingPages.ps1 -SourceSitePartUrl "<SOURCE_SITE>" -TargetSitePartUrl "<TARGET_SITE>" -PartTenant "<TENANT>"

@gabrielbray : Did you test in a new PS shell, there's caching going on and a new shell will clear that.

Hey @jansenbe I was looking over the documentation again and I neglected to allow custom scripting via PowerShell on the destination site. I'll follow-up if that doesn't clear up the issue.

Hi @gabrielbray : did you manage to get things working?

Hi @jansenbe I was able to get back to it last night and it's working now. Appreciate the follow up!