Error '0x0D' is invalid within a JSON string when using -UseCommunityScriptEditor parameter #5363
Closed
1 of 9 tasks
Labels
sample: react-script-editor
Stale
status:wrong-author
type:bug-suspected
Suspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs
Disclaimer
Yes
Sample
react-script-editor
Contributor(s)
Mikael Svenson
What happened?
I am encountering an issue when using the ConvertTo-PnPPage command with the -UseCommunityScriptEditor parameter. The command works fine without this parameter, but when I include -UseCommunityScriptEditor, I receive the following error:
"'0x0D' is invalid within a JSON string. The string should be correctly escaped. Path: $ | LineNumber: 0 | BytePositionInLine: 150."
The command I used:
ConvertTo-PnPPage -Identity $ClassicPageName -Overwrite -Library $Library -PublishingPage -TargetWebUrl $TaretWebUrl -UseCommunityScriptEditor
Steps to reproduce
1.First, add the modern Script Editor to the classic site.
2.Next, upload the same modern Script Editor to the target modern site.
3.Execute the PnP command listed above
Expected behavior
・The classic page containing JavaScript should be converted to a modern page.
・The converted page should be migrated to the specified target site.
Target SharePoint environment
SharePoint Online
Developer environment
Windows
Browsers
What version of Node.js is currently installed on your workstation?
v18.20.5
What version of Node.js is required by the sample?
v18
Paste the results of SPFx doctor
'0x0D' is invalid within a JSON string. The string should be correctly escaped. Path: $ | LineNumber: 0 | BytePositionInLine: 150.
Additional environment details
No response
The text was updated successfully, but these errors were encountered: