Skip to content

fix(publish): keep image assets out of link mapping, refuse empty-shell recovery, decode : styles - #62

Merged
rockyltwong merged 2 commits into
mainfrom
fix/publish-page-news-pilot
Nov 6, 2026
Merged

rockyltwong merged 2 commits into
mainfrom
fix/publish-page-news-pilot

Conversation

@rockyltwong

Copy link
Copy Markdown
Collaborator

Summary

Fixes found while migrating CSB news messages to SPO with the page planner and publisher.

  • Planner: image destinations taken from the image manifest are no longer rewritten by -LibraryPathMapPath link mapping (a page under /Pages/ resolved SiteAssets/... against the page URL and broke the asset match). New -NoBcDesignTokens switch skips the BC design-token wrapper on text web parts (default unchanged).
  • Publisher: -RecoverPartialPage now refuses unless the single existing component is a text web part with visible content (Assert-SpoRecoverableComponent); an empty draft shell was previously "recovered" and published blank. Image size and alignment readers decode SharePoint's : for : in styles.
  • Contract: -OutputPath belongs to the wave publisher only; publish-spo-page.ps1 has no such parameter. Documents the recovery refusal.

Both copies of new-page-migration-dry-run.ps1 (modernizing and publishing) stay identical.

Testing

python -m pytest plugins/sharepoint-workbench/tests/test_publish_page_fixes.py (12 tests, written first). The rest of the plugin suite passes except the PDF tests, which already fail to collect (NameError: LoadedChunk in canonical_package.py). The recovery refusal is unit-tested only, not against a tenant.

rockyltwong and others added 2 commits November 5, 2026 23:34
…ll recovery, decode : styles

- planner: leave manifest image destinations unmapped; add -NoBcDesignTokens
- publisher: Assert-SpoRecoverableComponent refuses recovery of an empty shell;
  image size/alignment readers decode :
- contract: -OutputPath belongs to the wave publisher only

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rockyltwong
rockyltwong merged commit f4e1575 into main Nov 6, 2026
4 checks passed
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.

1 participant