Skip to content

docs(v8-migration): two pages on one path, v7 served the last, matchRoute takes the first - #849

Draft
Arazoleo wants to merge 1 commit into
mainfrom
docs/v8-duplicate-page-paths
Draft

Arazoleo wants to merge 1 commit into
mainfrom
docs/v8-duplicate-page-paths

Conversation

@Arazoleo

@Arazoleo Arazoleo commented Nov 26, 2026 •

Copy link
Copy Markdown

What

A lesson for deco-v7-to-v8-migration/references/content.md, from a real v7 → v8 migration.

Published content can keep two page blocks that declare the same literal path, for example a stale page left next to the real one:

  • v7 registered routes in block order, so the last block won, and that is what production serves;
  • v8's matchRoute returns the first match.

A bare port therefore serves a different page than production at that URL, with no error in the build or in deco check.

The reference now says:

  • how to wire src/cms.ts: dedupe inside content.blocks, not on the wrapper, and apply the same set to the sitemap;
  • how to find the duplicates in discovery;
  • how to validate the fix.

Parity vendors this file at a pinned blocks commit, so the lesson reaches the porting agents with the next ref bump there.


Summary by cubic

Documents a v7 → v8 behavioral difference when two published pages declare the same literal path: v7 served the last block in registration order, while matchRoute takes the first. A bare port can therefore silently serve a different page than production at that URL, with no error in the build or in deco check.

The reference now covers deduping page blocks in src/cms.ts (filter inside content.blocks, not on the exported wrapper, and apply the same filter to the sitemap), finding the duplicates during discovery, and validating the fix.

Written for commit 4f287db. Summary will update on new commits.

View guided diff Turn on auto-fix

…Route takes the first

Published content can keep two page blocks with the same literal path. v7
registered routes in block order, so production serves the last one; v8's
matchRoute returns the first, so a bare port serves a different page at that
URL with no error in the build or in deco check. The reference now says how to
wire src/cms.ts (dedupe inside content.blocks, and the sitemap too), how to find
duplicates in discovery, and how to validate.
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