pnp / modernization

All modernization tooling and guidance
http://aka.ms/sppnp-modernize
MIT License
156 stars 86 forks source link

[BUG] Content editor web part losing table format and images inside a table on editing the modernized page #628

Open krisshelly opened 2 years ago

krisshelly commented 2 years ago

Problem Area

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

Expected or Desired Behavior

Content in the tables having custom formatting for the table and images added within the table cells in the content editor web part in the classic web part pages should be modernized properly.

PnP PowerShell Online Version Details: Name: SharePointPnPPowerShellOnline Version: 3.29.2101.0

Observed Behavior

Content in the content editor web parts having tables with formatting and images within the table are migrated properly but when we edit the page and save the modernized page, it is losing its table format along with the inline images in the table.

Classic Web part page

image

Modernized page

image

Edit and save the modernized page

image

You can notice, it is losing the image on save and for other cases it is also losing formatting in the tables which has highly customized formatting.

Steps to Reproduce

Create a classic web part page -> add content editor web part -> Insert tables -> apply custom formatting -> add images in the table cell -> save the page

Then use the below script to modernize the page:

ConvertTo-PnPPage -Identity $page.FieldValues["ID"] -Overwrite -DisablePageComments -AddTableListImageAsImageWebPart: $false -ClearCache -SkipItemLevelPermissionCopyToClientSidePage -TakeSourcePageName:$TakeSourcePageName -LogType File -LogFolder $LogOutputFolder -LogVerbose -LogSkipFlush -KeepPageCreationModificationInformation -CopyPageMetadata