Repository navigation
Resolve catalog product description links through the route table - #7563
Merged
Merged
Conversation
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.
Problem
Captured page content resolves links to captured routes locally:
https://source/policies/becomes/policies/. Caller-catalog product descriptions bypass that step, so their source links reach WordPress as absolute links to the old store.In the velocitytechsolutions.com import, 1,581 product descriptions link to
https://velocitytechsolutions.com/policies/#International, although/policies/was imported and serves locally.Fix
Once product declarations are final,
SitePlanRunmaps each product'sdescriptionandshort_descriptionthrough the sameRouteLinks::markupthat page content uses. Relative links resolve against the product's own page, or against the entrypoint for catalog-only rows. Captured routes become local; uncaptured routes keep their source URL, exactly as on pages.Evidence
tests/contract/caller-products-catalog.php: a catalog-only row's description links to a captured detail page and to an uncaptured/policies/.FAIL … href="https://example.test/products/a.html"./products/a, the same form page links take, and/policies/stays on the source.In the full suite, the only failures are the four that also fail on trunk:
artwork-slideshow,component-interactions,positioned-carousel-stageandshared-chrome-corpus.AI disclosure: written with Claude (Claude Code via Roadie), from import-loop evidence; Chris directed the work.