Repository navigation
fix(routing): guard storefront alias resolution during error handling - #36
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.
Legacy Manager/API entrypoints can dispatch
OnPageNotFoundbefore the HTTP request service is bound, causingTarget class [request] does not exist.Storefront alias resolution can also run again after an internal forward, and a stale product placeholder can replace the selected error document.The routing guards skip Manager/API and requestless alias resolution, avoid re-entering alias lookup after internal forwards, and preserve internally selected error/unauthorized documents. Empty paths no longer access an undefined array offset. Valid product and language-prefixed aliases keep working.
The full regression suite also exposed two existing failures: quick checkout retained a validated piece quantity as a string, and the piece cart/order JSON fixture omitted physical fields already emitted by the base branch. Piece quantities now become integers after validation and the maximum check; validation plugins still receive raw input. The JSON fixture now includes the existing weight and dimension fields without changing totals or quantities.
Verification
git diff --checkpassed.b4118fe).Tests use isolated data and do not contact the site database, payment providers or TMS. No production deployment has been performed.