pnp / pnp/pnpframework

Invoking a site template with a list does not replace AllItems view

Open
#944 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

When I invoke a site template that creates or updates a list, the result always is at least two views:

  • AllItems: Only shows the title field
  • AllItems1: Contains the fields I want and is the default view

I can then manually modify the AllItems view to contain all desired fields and be the default, and remove the second view. Invoking the site template again restores the state and two views appear again etc.

I find this a bit annoying. I would rather like the framework to replace the AllItems view every time. I have read that there is the "RemoveExistingViews" attribute for a list, but this would also erase all custom views people have created.

Contributor guide

No contributing guide indexed for this repository

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 tracing site template invocation and the list-view provisioning path that creates AllItems and AllItems1. Compare the handling of the built-in view with custom views; done means repeated template application replaces AllItems with the desired fields while preserving custom views.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.