pnpframework icon indicating copy to clipboard operation
pnpframework copied to clipboard

Invoke-PnPSiteTemplate: <pnp:Security> Not Applied to Existing Page

Open anthonywhite opened this issue 4 years ago • 0 comments

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

  1. SharePoint site with existing Site Pages, PnP Template required to deliver Security changes only, leaving page content untouched i.e. "delta" template scenario.
  2. Xml Site Template containing a <pnp:ClientSidePage> element referring to an existing page. Attribute Overwrite not specified as page content required to be retained (If Overwrite is set to True page content will be lost).
  3. Add a <pnp:Security> element within the above <pnp:ClientSidePage> but NO OTHER page elements
  4. Run Invoke-PnPSiteTemplate using 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?

  • [x] Windows 10
  • [x] 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

anthonywhite avatar Jul 26 '21 14:07 anthonywhite