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

Error '0x0D' is invalid within a JSON string when using -UseCommunityScriptEditor parameter #5363

Closed
1 of 9 tasks
tatsutanaka opened this issue Dec 26, 2024 · 3 comments
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

Comments

@tatsutanaka
Copy link

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

  • Internet Explorer
  • Microsoft Edge
  • Google Chrome
  • FireFox
  • Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

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

@tatsutanaka tatsutanaka added the type:bug-suspected Suspected bug (not working as designed/expected). See type:bug-confirmed for confirmed bugs label Dec 26, 2024
Copy link

Wrong or missing contributor @mentions

Thank you for your submission, but you appear to have forgotten to @mention the sample author(s).

To help increase your chances of getting assistance from the original authors of the sample, you should make sure to @mention the actual authors (and not the repository maintainers).

Make sure to include the @ character before the GitHub username so that the author(s) get notified; using the person's name is not going to work.

Please note that the sample authors will not get notified about this issue unless you update this issue accordingly.

You can find the author(s) of each sample in the sample's README.md, under Solution.

We'll automatically close this issue in 7 days unless you update the issue.

For more information on how to create a good issue, refer to our wiki for more information: How to Create Good Issues

Copy link

Please note that this issue will be closed within 24 hours because it has been flagged as having invalid authors. Read the guidance and @mention the authors so they can respond to you.

@github-actions github-actions bot added the Stale label Jan 25, 2025
Copy link

Closing this issue due to lack of response. Feel free to open a new issue, but make sure to follow the guidance on how to create good issues and @mention the authors so they can respond to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants