Repository navigation
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: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:
src/cms.ts: dedupe insidecontent.blocks, not on the wrapper, and apply the same set to the sitemap;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
matchRoutetakes the first. A bare port can therefore silently serve a different page than production at that URL, with no error in the build or indeco check.The reference now covers deduping page blocks in
src/cms.ts(filter insidecontent.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.