docs(v8-migration): two pages on one path, v7 served the last, matchRoute takes the first
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
matchRoutereturns 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 insidecontent.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.