Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - ConvertTo-PnPPage fails whenever the page being converted contains images #670

Closed
msramanujam opened this issue Jun 8, 2024 · 3 comments

Comments

@msramanujam
Copy link

Problem Area

[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

ConvertTo-PnPPage must convert the wiki page to a modern page.

Observed Behavior

Whenever ConvertTo-PnPPage is executed on a Wiki Page that contains images, the transformation fails with the error below:
[Adding Web Parts to Target Page] Using 'Image' modern web part
Error: [Summary] A critical error occurred - transformation did not complete Error: 'I' is an invalid start of a property name. Expected a '"'. Path: $ | LineNumber: 0 | BytePositi
onInLine: 495. StackTrace: at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo1 jsonTypeInfo) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at PnP.Core.Model.SharePoint.PageWebPart.set_PropertiesJson(String value) at PnP.Framework.Modernization.Transform.ContentTransformator.Transform(List1 webParts)
at PnP.Framework.Modernization.Transform.PageTransformator.Transform(PageTransformationInformation pageTransformationInformation)

When I take the same wiki page & remove all images contained within it, the conversion proceeds without errors.

Steps to Reproduce

Execute ConvertTo-PnPPage on a wiki page containing images to reproduce the error.

@pealmasa
Copy link

pealmasa commented Jul 10, 2024

There must be something else other than wiki page and image. I have tried reproduce it with wiki page with an image and conversion was ok.

@msramanujam
Copy link
Author

msramanujam commented Jul 10, 2024 via email

@VesaJuvonen
Copy link

Closing based on the comment from the original author of the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants