Skip to content

404 page doesn't show with i18n enabled #12509

@cdelacombaz

Description

@cdelacombaz

Astro Info

Astro                    v4.16.13
Node                     v20.15.0
System                   macOS (arm64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/svelte
                         @astrojs/tailwind

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I added multi-file based structure to handle i18n as described in this guide.

I have a 404.astro page in /pages

If I visit any url prefixed with one of my supported languages, it does show my 404 page.

If I visit any url without valid language prefix, i get a blank page.

For example:

Supported languages set in my astro config: fr, de

/fr/blabla => 404 page
/de/blabla => 404 page

/blabla => blank page
/en/blabla => blank page

What's the expected result?

I would expect that any path that doesn't exist would show the 404 page

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-nczwja?on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

- P4: importantViolate documented behavior or significantly impacts performance (priority)feat: i18nRelated to internalization (scope)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions