Invoke-PnPSiteTemplate: <pnp:Security> Not Applied to Existing Page
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
Reporting an Issue or Missing Feature
Invoke-PnPSiteTemplate: <pnp:Security> Not Applied to existing ClientSidePage
Expected behavior
<pnp:Security> would be applied to an existing ClientSidePage
Actual behavior
<pnp:Security> definition is not applied, trace log indicates skipped because overwrite flag not set
Steps to reproduce behavior
- SharePoint site with existing Site Pages, PnP Template required to deliver Security changes only, leaving page content untouched i.e. "delta" template scenario.
- Xml Site Template containing a
<pnp:ClientSidePage>element referring to an existing page. AttributeOverwritenot specified as page content required to be retained (If Overwrite is set to True page content will be lost). - Add a
<pnp:Security>element within the above<pnp:ClientSidePage>but NO OTHER page elements - Run
Invoke-PnPSiteTemplateusing this template
What is the version of the Cmdlet module you are running?
1.6.0 and also 1.6.49-nightly
Which operating system/environment are you running PnP PowerShell on?
- Windows 10
- PowerShell Core 7.1.3
Workaround
None
PnP Trace Log
pwsh Warning: 0 : 2021-07-26 13:26:01.3782 [ClientSidePages] [12] [Information] Page with name ClientHome.aspx did already exist and the overwrite flag was not set, so nothing happened
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Invoke-PnPSiteTemplate and the ClientSidePage provisioning path, using the trace entry showing that an existing page is skipped when Overwrite is unset. Done means a template containing only ClientSidePage and Security applies the security definition to an existing page without replacing its content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cloud, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100