Fix dynamic route parameters in domain-based i18n routing#16855
Merged
Conversation
1 task
🦋 Changeset detectedLatest commit: 47cf221 The changes in this PR will be included in the next version bump. This PR includes changesets to release 398 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This PR fixes the 500 error, but |
Contributor
e18e dependency analysisNo dependency warnings found. |
Princesseuh
approved these changes
Jun 3, 2026
This was referenced Jun 3, 2026
Merged
dadezzz
pushed a commit
to dadezzz/university_notes
that referenced
this pull request
Jun 7, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`6.4.3` → `6.4.4`](https://renovatebot.com/diffs/npm/astro/6.4.3/6.4.4) |  |  | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v6.4.4`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#644) [Compare Source](https://github.com/withastro/astro/compare/[email protected]@6.4.4) ##### Patch Changes - [#​16926](withastro/astro#16926) [`1b39ae8`](withastro/astro@1b39ae8) Thanks [@​narendraio](https://github.com/narendraio)! - Prevents `App.match()` from throwing on request paths that contain an invalid percent-sequence. - [#​16924](withastro/astro#16924) [`2c0bc94`](withastro/astro@2c0bc94) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes an issue where editing a client-side component (e.g. with `client:idle`, `client:load`, etc.) caused an unnecessary full program reload of the backend during development. - [#​16958](withastro/astro#16958) [`2c1d50f`](withastro/astro@2c1d50f) Thanks [@​fkatsuhiro](https://github.com/fkatsuhiro)! - Fixes a bug where static file endpoints using `getStaticPaths` with `.html` in dynamic param values (e.g. `{ path: 'file.html' }`) would fail with a `NoMatchingStaticPathFound` error during build. The `.html` suffix is no longer incorrectly stripped from endpoint route pathnames. - [#​16855](withastro/astro#16855) [`c610cda`](withastro/astro@c610cda) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes dynamic routes returning 500 "TypeError: Missing parameter" when using domain-based i18n routing in SSR. - [#​16946](withastro/astro#16946) [`606c37b`](withastro/astro@606c37b) Thanks [@​ematipico](https://github.com/ematipico)! - Fixes `Astro.routePattern` to preserve original casing of dynamic parameter names from filenames. Previously, a file at `src/pages/blog/[postId].astro` would return `/blog/[postid]` for `Astro.routePattern` due to an internal `.toLowerCase()` call. It now correctly returns `/blog/[postId]`. - [#​16720](withastro/astro#16720) [`16d49b6`](withastro/astro@16d49b6) Thanks [@​thomas-callahan-collibra](https://github.com/thomas-callahan-collibra)! - Fix an issue where dynamic routes would return the string `[object Object]` instead of the expected content, in certain runtimes. - [#​16703](withastro/astro#16703) [`17390a6`](withastro/astro@17390a6) Thanks [@​henrybrewer00-dotcom](https://github.com/henrybrewer00-dotcom)! - Fixes styles being stripped when the project root is started with a path whose case differs from the actual filesystem case (e.g. running `astro dev` from `d:\dev\app` while the folder on disk is `D:\dev\app`). - [#​16855](withastro/astro#16855) [`c610cda`](withastro/astro@c610cda) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes `Astro.currentLocale` returning the default locale instead of the domain's locale on dynamic routes served from a mapped domain. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDUuMyIsInVwZGF0ZWRJblZlciI6IjQzLjIwNS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
1 task
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.
Changes
This PR fixes two bugs:
TypeError: Missing parametertriggered in some cases, as reported in the issue.Astro.currentLocalewas incorrect when rendering a domain pathname. That was caused by the fact that thei18ndidn't have visibility of the domain pathname. The logic that computes the domain pathname is now extracted in a pure function.Testing
packages/astro/test/units/i18n/i18n-app.test.tswith two tests verifying params are correctly resolved for dynamic routes on both non-default and default locale domains[id],[slug]) that triggerTypeError: Missing parameterwhen missing, unlike catch-all[...slug]routes which return empty stringsDocs
Closes #16854