Provisioning a list should only change settings present in the template - but tries to change more
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
Assume you want to change some settings for a SharePoint list via PnP provisioning. You craft a PnP template that sets those settings and omits all others.
The Site Pages library shall serve as example. This is a template providing versioning settings:
<pnp:Lists>
<pnp:ListInstance Title="Site Pages" Url="SitePages" EnableVersioning="true" EnableMinorVersions="true" MinorVersionLimit="0" MaxVersionLimit="1000" DraftVersionVisibility="0" >
</pnp:ListInstance>
</pnp:Lists>
Please note that there is only a limited set of attributes on the ListInstance element. Everything not related to versioning has been omitted.
Expected behavior when invoking this site template
The specified settings are applied to the Site Pages library. Everything else stays the same.
Actual behavior
I get an exception when invoking the site template telling me that attachments are prohibited for the Site Pages library. This tells me that there are other settings modified as well, in this case I suspect the EnableAttachments property - that is not present in the template, but some code apparently tries to enable it.
Notes
Is my expectation right, that any settings not present in the template should stay as they are? I did not look at the code but I fear that properties not set in the template might cause settings to be set to some default value, which would change list settings which are not supposed to be changed by the template.
Additional note: I got the error when calling Invoke-PnPSiteTemplate from PnP.PowerShell but assume the issue is within the PnP.Framework code.
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
Reproduce the issue through Invoke-PnPSiteTemplate using the shown ListInstance template for the Site Pages library. Trace the PnP.Framework list-provisioning path and verify that omitted settings such as EnableAttachments are not changed; done means versioning settings apply without altering other existing settings or raising the attachments exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100