ConvertTo-PnPPage transformation, Some pages fails with error "'0x0A' is invalid within a JSON string. The string should be correctly escaped."
@jansenbe is already working on this.
Since Mar 17, 2022.
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
Follow up to issue 311
Converting pages with content editor webparts containig images pointing to https://xxx.sharepoint.com/_layouts/15/images/icpdf.png fail with "A critical error occurred - transformation did not complete Error: '0x0A' is invalid within a JSON string. The string should be correctly escaped." When removing the https://xxx.sharepoint.com/_layouts/15/images/icpdf.png images, the conversion is successful.
Transformation log follows:
Modernization Summary Report
| Date | Duration | Source Page | Target Page Url | Status |
|---|---|---|---|---|
| 01.02.2022 12:06:11 | 00:00:03 | /mitarbeiter/gesundheitsmanagement/Seiten/Stressbewältigung.aspx | A issue prevented successful transformation |
Warnings during transformation
| Date | Source Page | Operation | Message |
|---|---|---|---|
| 01.02.2022 12:06:15 | /mitarbeiter/gesundheitsmanagement/Seiten/Stressbewältigung.aspx | Asset Transfer | Asset was not transferred. Asset: /_layouts/15/images/icpdf.png |
| 01.02.2022 12:06:15 | /mitarbeiter/gesundheitsmanagement/Seiten/Stressbewältigung.aspx | Asset Transfer | Asset was not transferred. Asset: /_layouts/15/images/icpdf.png |
| 01.02.2022 12:06:15 | /mitarbeiter/gesundheitsmanagement/Seiten/Stressbewältigung.aspx | Asset Transfer | Asset was not transferred. Asset: /_layouts/15/images/icpdf.png |
| 01.02.2022 12:06:15 | /mitarbeiter/gesundheitsmanagement/Seiten/Stressbewältigung.aspx | Asset Transfer | Asset was not transferred. Asset: /_layouts/15/images/icpdf.png |
Critical Errors during transformation
01.02.2022 12:06:15 - /mitarbeiter/gesundheitsmanagement/Seiten/Stressbewältigung.aspx
'0x0A' is invalid within a JSON string. The string should be correctly escaped. Path: $ | LineNumber: 0 | BytePositionInLine: 84. bei System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& readStack, JsonReaderException ex)
bei System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
bei System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader)
bei System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)
bei System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
bei PnP.Core.Model.SharePoint.PageWebPart.set_PropertiesJson(String value)
bei PnP.Framework.Modernization.Transform.ContentTransformator.Transform(List`1 webParts)
bei PnP.Framework.Modernization.Publishing.PublishingPageTransformator.Transform(PublishingPageTransformationInformation publishingPageTransformationInformation)
Individual Page details
Transformation Details: /mitarbeiter/gesundheitsmanagement/Seiten/Stressbewältigung.aspx
- Report date: 01.02.2022 12:06:11
- Transform duration: 00:00:03
- Transforming from site: https://xxx.sharepoint.com/sites/intranet/mitarbeiter/gesundheitsmanagement
- Cross-Site transfer mode to site: https://xxx.sharepoint.com/sites/nit
- Transforming page: /sites/intranet/mitarbeiter/gesundheitsmanagement/Seiten/Stressbewältigung.aspx
- Source SharePoint version: Online (16.0.0.22112)
- Mode: Publishing Page Transformation Mode
- An referenced asset was found and copied to: /sites/nit/SiteAssets/SitePages/Stressbewältigung/Stressbewältigung_breit.jpg
- An referenced asset was found and copied to: /sites/nit/SiteAssets/SitePages/Stressbewältigung/10 Tipps Stress.jpg
- A critical error occurred - transformation did not complete
Page Transformation Settings
| Property | Setting |
|---|---|
| Engine version | 1.8.3.0 |
| Overwrite | True |
| Target Page Name | Stressbewältigung.aspx |
| Target Page Folder | Stressbewältigung |
| Target Page Folder Overrides Default Folder | False |
| Keep Page Specific Permissions | False |
| Remove Empty Sections And Columns | False |
| Handle Wiki Images And Videos | True |
| Add Table List Image As Image Web Part | True |
| Keep Page Creation Modification Information | True |
| Publish Created Page | True |
| Post As News | False |
| Disable Page Comments | True |
| Skip Url Rewrite | False |
| Skip Default Url Rewrite | False |
| Url Mapping File | c:\temp\urlmapping.txt |
| Skip Hidden Web Parts | False |
| Term Mapping File | |
| Skip Term Store Mapping | False |
| Skip User Mapping | True |
| User Mapping File | |
| L D A P Connection String | |
| Skip Telemetry | False |
Transformation Operation Details
| Date | Operation | Actions Performed |
|---|---|---|
| 01.02.2022 12:06:11 | Input Validation | Validation checks complete |
| 01.02.2022 12:06:11 | SharePoint Connection | Loading client context objects |
| 01.02.2022 12:06:11 | SharePoint Connection | Loading target client context object |
| 01.02.2022 12:06:11 | Page Creation | Detect if the page is living inside a folder |
| 01.02.2022 12:06:11 | Page Creation | The transform page is located in a folder |
| 01.02.2022 12:06:11 | Page Creation | Just try to load the page in the fastest possible manner, we only want to see if the page exists or not |
| 01.02.2022 12:06:13 | Load | Page does not exist in current web |
| 01.02.2022 12:06:13 | Page Creation | Checking Page Exists |
| 01.02.2022 12:06:13 | Page Creation | Modern page created |
| 01.02.2022 12:06:13 | Article page handling | Transforming source page as Article page |
| 01.02.2022 12:06:13 | Article page handling | Recognized source page as a Publishing Page - Analyzing web parts and page layouts |
| 01.02.2022 12:06:13 | Page Layout Manager | Page uses xxxContentPageNoContact as page layout, mapping that will be used is xxxContentPageNoContact |
| 01.02.2022 12:06:13 | Article page handling | Splitting images and videos from wiki text - as modern text web part does not support embedded images and videos |
| 01.02.2022 12:06:13 | Set Page Title | Setting the modern page title: Stressbewältigung |
| 01.02.2022 12:06:13 | Article page handling | Preparing content transformation |
| 01.02.2022 12:06:13 | Article page handling | Transforming content |
| 01.02.2022 12:06:13 | Content Transform | Transforming web parts |
| 01.02.2022 12:06:14 | Web Part Mapping | Web Part:'Wiki text' of type 'SharePointPnP.Modernization.WikiTextPart' is being transformed |
| 01.02.2022 12:06:14 | Web Part Mapping | Processing selector functions |
| 01.02.2022 12:06:14 | Web Part Mapping | Combining mapping data |
| 01.02.2022 12:06:14 | Adding Web Parts to Target Page | Added 'Client Side Text Web Part' to target page |
| 01.02.2022 12:06:14 | Web Part Mapping | Web Part:'Image in wiki text' of type 'SharePointPnP.Modernization.WikiImagePart' is being transformed |
| 01.02.2022 12:06:14 | Web Part Mapping | Processing selector functions |
| 01.02.2022 12:06:14 | Web Part Mapping | Combining mapping data |
| 01.02.2022 12:06:14 | Adding Web Parts to Target Page | Using 'Image' modern web part |
| 01.02.2022 12:06:14 | Adding Web Parts to Target Page | Added 'Image' Client Side Web Part to target page |
| 01.02.2022 12:06:14 | Web Part Mapping | Web Part:'Wiki text' of type 'SharePointPnP.Modernization.WikiTextPart' is being transformed |
| 01.02.2022 12:06:14 | Web Part Mapping | Processing selector functions |
| 01.02.2022 12:06:14 | Web Part Mapping | Combining mapping data |
| 01.02.2022 12:06:14 | Adding Web Parts to Target Page | Added 'Client Side Text Web Part' to target page |
| 01.02.2022 12:06:14 | Web Part Mapping | Web Part:'Wiki text' of type 'SharePointPnP.Modernization.WikiTextPart' is being transformed |
| 01.02.2022 12:06:14 | Web Part Mapping | Processing selector functions |
| 01.02.2022 12:06:14 | Web Part Mapping | Combining mapping data |
| 01.02.2022 12:06:14 | Adding Web Parts to Target Page | Added 'Client Side Text Web Part' to target page |
| 01.02.2022 12:06:14 | Web Part Mapping | Web Part:'Image in wiki text' of type 'SharePointPnP.Modernization.WikiImagePart' is being transformed |
| 01.02.2022 12:06:14 | Web Part Mapping | Processing selector functions |
| 01.02.2022 12:06:15 | Web Part Mapping | Combining mapping data |
| 01.02.2022 12:06:15 | Adding Web Parts to Target Page | Using 'Image' modern web part |
| 01.02.2022 12:06:15 | Adding Web Parts to Target Page | Added 'Image' Client Side Web Part to target page |
| 01.02.2022 12:06:15 | Web Part Mapping | Web Part:'Image in wiki text' of type 'SharePointPnP.Modernization.WikiImagePart' is being transformed |
| 01.02.2022 12:06:15 | Web Part Mapping | Processing selector functions |
| 01.02.2022 12:06:15 | Asset Transfer | Asset was not transferred. Asset: /_layouts/15/images/icpdf.png |
| 01.02.2022 12:06:15 | Web Part Mapping | Combining mapping data |
| 01.02.2022 12:06:15 | Adding Web Parts to Target Page | Using 'Image' modern web part |
| 01.02.2022 12:06:15 | Adding Web Parts to Target Page | Added 'Image' Client Side Web Part to target page |
| 01.02.2022 12:06:15 | Web Part Mapping | Web Part:'Image in wiki text' of type 'SharePointPnP.Modernization.WikiImagePart' is being transformed |
| 01.02.2022 12:06:15 | Web Part Mapping | Processing selector functions |
| 01.02.2022 12:06:15 | Asset Transfer | Asset was not transferred. Asset: /_layouts/15/images/icpdf.png |
| 01.02.2022 12:06:15 | Web Part Mapping | Combining mapping data |
| 01.02.2022 12:06:15 | Adding Web Parts to Target Page | Using 'Image' modern web part |
| 01.02.2022 12:06:15 | Adding Web Parts to Target Page | Added 'Image' Client Side Web Part to target page |
| 01.02.2022 12:06:15 | Web Part Mapping | Web Part:'Image in wiki text' of type 'SharePointPnP.Modernization.WikiImagePart' is being transformed |
| 01.02.2022 12:06:15 | Web Part Mapping | Processing selector functions |
| 01.02.2022 12:06:15 | Asset Transfer | Asset was not transferred. Asset: /_layouts/15/images/icpdf.png |
| 01.02.2022 12:06:15 | Web Part Mapping | Combining mapping data |
| 01.02.2022 12:06:15 | Adding Web Parts to Target Page | Using 'Image' modern web part |
| 01.02.2022 12:06:15 | Adding Web Parts to Target Page | Added 'Image' Client Side Web Part to target page |
| 01.02.2022 12:06:15 | Web Part Mapping | Web Part:'Image in wiki text' of type 'SharePointPnP.Modernization.WikiImagePart' is being transformed |
| 01.02.2022 12:06:15 | Web Part Mapping | Processing selector functions |
| 01.02.2022 12:06:15 | Asset Transfer | Asset was not transferred. Asset: /_layouts/15/images/icpdf.png |
| 01.02.2022 12:06:15 | Web Part Mapping | Combining mapping data |
| 01.02.2022 12:06:15 | Adding Web Parts to Target Page | Using 'Image' modern web part |
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.