pnp / pnp/powershell

[BUG] Using Set-PnPFooter with BackgroundTheme does not work for new multi-colored themes

Open
#5,399 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
904
Forks
407
Avg merge
9h 16m
Merged PRs (30d)
10

Description

Background

I have written some templates and scripts to configure sites in a multi-site application, and one of the tasks needed was to set the background color of the footer (This issue might affect the header as well, but have not tested).

Issue

I am using the Set-PnPFooter command with the BackgroundTheme parameter, and have tested with all supported values (0-3 indicies, Strong, Neutral, ect.).

The command works fine as long as I use a theme based on the old palette with only one primary color giving you four color options. However, if applying a new multi-colored theme to the site, the command still works, but the background color setting is just ignored.

Now I realize this might not be a bug in PnP, but potentially Microsoft could have updated the model on their end and it could be made to work again by adjusting.

Expected behavior

The background color of the footer will change regardless of type of theme used.

Actual behavior

The background color of the footer will not change for new multi-colored themes.

Steps to reproduce behavior
  1. Create a new site
  2. Connect to the new site using Connect-PnPOnline
  3. Run the following command to setup the footer, including background color:
    Set-PnPFooter -Enabled:$true -Layout Extended -BackgroundTheme 3
    The color of the footer will change.
  4. Change the theme of the site to a built-in or custom multi-colored theme built in the brand center
  5. Re-connect to the site using Disconnect-PnPOnline and Connect-PnPOnline
  6. Run the following commands again to setup the footer, including background color:
    Set-PnPFooter -Enabled:$true -Layout Extended -BackgroundTheme 0
    The color of the footer will not change.
What is the version of the Cmdlet module you are running?

3.2.0

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with Set-PnPFooter and the BackgroundTheme values described in the issue, using an old-palette and a multi-colored SharePoint theme. Then locate the Set-PnPFooter implementation and determine how the footer background is applied; done means the setting changes for multi-colored themes and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.