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] Add-PnPPageSection throws error "Invalid character in Xml String." #4073

Open
1 of 6 tasks
exensio-rori opened this issue Jul 5, 2024 · 2 comments
Open
1 of 6 tasks
Labels
bug Something isn't working

Comments

@exensio-rori
Copy link

Reporting an Issue or Missing Feature

"Add-PnPPageSection" does not add the new section and ends with error message.

Expected behavior

"Add-PnPPageSection" adds the new section with the specified properties.

Actual behavior

Error while adding the web part: Invalid character in Xml String. Chr 2 is illegal.

Steps to reproduce behavior

SharePoint page with Text web part which contains the following text:
Te�st
(these are 5 characters, four of them are 'normal' and one of them is a special character or control character)
Add-PnPPageSection -Page <myPage> -SectionTemplate OneColumn

What is the version of the Cmdlet module you are running?

PnP.PowerShell 2.2.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@exensio-rori exensio-rori added the bug Something isn't working label Jul 5, 2024
@exensio-rori
Copy link
Author

Entering the control character here in GitHub is not possible (for me).

@markgort86
Copy link
Contributor

markgort86 commented Jul 8, 2024

Is the error also available with the most recent version of PnP.PowerShell? The community just released version 2.5.0
See: https://www.powershellgallery.com/packages/PnP.PowerShell/2.5.0.

You can install this version by using Install-Module -Name PnP.PowerShell -RequiredVersion 2.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants