Skip to content

Add staged publishing-page migration framework for Enterprise Wiki - #1278

Draft
TaoziZ03 wants to merge 53 commits into
pnp:devfrom
TaoziZ03:codex/enterprise-wiki-migration
Draft

Add staged publishing-page migration framework for Enterprise Wiki#1278
TaoziZ03 wants to merge 53 commits into
pnp:devfrom
TaoziZ03:codex/enterprise-wiki-migration

Conversation

@TaoziZ03

@TaoziZ03 TaoziZ03 commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • add a source-only Enterprise Wiki export snapshot with complete Pages-library field evidence
  • add target-specific planning with sealed snapshot/plan digests and a field-by-field review report
  • import only recognized, writable, type-compatible fields while retaining unknown fields for future recovery
  • derive Publishing Page lifecycle conservatively: only an unambiguous published source is published; every other state remains draft
  • refactor the implementation into a shared page kernel, a Publishing Page family, and an Enterprise Wiki profile

Consumer cmdlet PR: pnp/powershell#5457. It intentionally remains unchanged while the Framework API and namespace layout are reviewed.

Architecture

The dependency direction is now:

PnP.Framework.Migration.Pages
    shared page identity, capture, fields, references, security,
    classic Web Parts, content rewriting, lifecycle evidence, and planning
        ^
        |
PnP.Framework.Migration.Pages.Publishing
    publishing layout/content aggregate, target lifecycle,
    packages, reports, planning contract, and verification
        ^
        |
PnP.Framework.Migration.Pages.Publishing.EnterpriseWiki
    content-type/layout classification, target policy,
    Web Part portability, and workflow orchestration

This is composition rather than a publishing-page inheritance hierarchy. Future Wiki Page and Web Part Page families can define their own aggregates while reusing PageIdentity, PageField*, ClassicWebPart*, PageReference*, PageSecurity*, PageLifecycleSnapshot, capture fences, and planning mechanics.

Policy now lives at the narrowest owning layer:

  • PageLifecycleSnapshot is shared evidence; PublishingPageLifecyclePolicy owns Draft/Published interpretation.
  • ClassicWebPartSnapshotReader only captures common export evidence; EnterpriseWikiWebPartPolicy owns the Enterprise Wiki portability decision.
  • PageIdentity is page-wide; publishing layout moved to PublishingPageLayoutSnapshot in the Publishing capture aggregate.
  • shared digest mechanics no longer depend on publishing packages.

The implementation reuses existing PnP primitives including GetPagesLibrary, AddPublishingPage, GetWebParts, AddWebPartToWebPartPage, EnsureFolderPath, UploadFile, ExecuteQueryRetry, UrlUtility, and ResourcePath.

API and namespace changes in this draft

  • PnP.Framework.Migration.PublishingPages.* -> PnP.Framework.Migration.Pages.* or PnP.Framework.Migration.Pages.Publishing.*, based on ownership
  • PublishingPageIdentity -> PageIdentity
  • PublishingPageExportOptions -> PageCaptureOptions
  • PublishingPagePlanningOptions -> PagePlanningOptions
  • PublishingPageMigrationOperation -> PageMigrationOperation
  • PublishingPageContentTransformer -> PageTextTransformer
  • PageWebPartSnapshot* -> ClassicWebPartSnapshot*
  • PageLifecyclePolicy -> PublishingPageLifecyclePolicy
  • PageWebPartPortabilityPolicy -> EnterpriseWikiWebPartPolicy

The JSON snapshot now stores publishing layout under snapshot.layout, separate from common snapshot.source identity. The schema remains draft/unreleased and the focused round-trip test covers the new shape.

Technical documentation

  • src/lib/PnP.Framework/Migration/README.md defines the migration boundary and links the current areas.
  • src/lib/PnP.Framework/Migration/Pages/README.md defines shared-kernel ownership, dependency direction, evidence-vs-policy rules, and how future page families compose it.
  • src/lib/PnP.Framework/Migration/Pages/Publishing/README.md documents the Publishing family, all versioned artifacts and fields, lifecycle behavior, field dispositions, reference/Web Part/security policy, validation expectations, and current limitations.

Validation

  • PnP.Framework builds passed for netstandard2.0, net8.0, net9.0, and net10.0
  • 8 focused EnterpriseWikiMigrationTests passed on net10.0
  • old namespace/type scan passed
  • shared Pages dependency audit passed: no reference to Publishing or EnterpriseWiki
  • git diff --check passed

No live-tenant import was run as part of this PR preparation.

@TaoziZ03 TaoziZ03 changed the title Add staged Enterprise Wiki migration service Add staged publishing-page migration framework for Enterprise Wiki Aug 31, 2026
@pkbullock

pkbullock commented Sep 4, 2026

Copy link
Copy Markdown
Member

Hey there, quick question what are you building here? Did you know we have the modernisation framework as part of this repo and PnP PowerShell that does this already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants