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] Separate page section backgrounds reset by Add-PnPPageSection and Add-PnPPageWebPart #4086

Open
1 of 6 tasks
JoelBool opened this issue Jul 10, 2024 · 0 comments
Open
1 of 6 tasks
Labels
bug Something isn't working

Comments

@JoelBool
Copy link

Issue

Section backgrounds are reset when updating a page with Add-PnPPageSection or Add-PnPPageWebPart and probably other commands.
Only the new section backgrounds are affected (i.e. not emphasis 0, 1, 2, 3 but rather the additional new ones that have gradiants images etc)

Expected behavior

Expecting Add-PnPPageSection, Add-PnPPageWebPart and other similar commands to not change separate sections on the page

Actual behavior

All section backgrounds that use the new backgrounds are reset on the page.

Before After
image image

Steps to reproduce behavior

  1. Create a page on a site using the UI
  2. Add a couple of sections.
  3. Change the section backgrounds to use the new ones (gradients etc)
  4. Publish the page
  5. Run commands to update the page. For example
$site = "Your_site_url"
$pageName = "Page_name"
Connect-PnpOnline $site
$page = Get-PnPPage -Identity $pageName 
Add-PnPPageSection -Page $page  -Order "0" -SectionTemplate "OneColumn"
  1. Reload the page in the browser. Note that all the new section background are gone

Note that the issue can also be reproduced with Add-PnPPageWebPart

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

2.5.0

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

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@JoelBool JoelBool added the bug Something isn't working label Jul 10, 2024
@JoelBool JoelBool changed the title [BUG] Separate page section backgrounds reset by Add-PnPPageSection and Add-PnPPageWebPart Jul 10, 2024
@JoelBool JoelBool changed the title Separate page section backgrounds reset by Add-PnPPageSection and Add-PnPPageWebPart [BUG] Separate page section backgrounds reset by Add-PnPPageSection and Add-PnPPageWebPart Jul 10, 2024
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

1 participant