Skip to content

Provisioning - Template extraction always sets page as Published #1274

Description

@Magnus-K-work

Found in: 1.21.0

How to reproduce:

  1. Set up a SharePoint site, and add a Page as draft only
  2. Run PnP.Framework provisioning to extract a template from that page (or site)
  3. Apply the template to another SharePoint site
  4. Examine the version history of new page => It is already published

Why this is an issue:
If copying a site with news, it is likely that the news needs to be updated for the new site. So, if any news pages already has a published version, that version will instantly be visible to visitors to the site.

Problem found:
In pnpframework\src\lib\PnP.Framework\Provisioning\ObjectHandlers\Utilities\ClientSidePageContentsHelper.cs, at line 109 the Published property of the extractedPage object is set to true. This will control if page will be created as a Published page later when applying the template to a SharePoint site.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions