Skip to content

Optional parameter with matcher followed by a rest parameter route results in 404 #8601

@oreilles

Description

@oreilles

Describe the bug

Considering the following route path:

/[[locale=locale]]/[category]/[...slug]
  • /fr/about/something succeed.
  • /about/something succeed.
  • /fr/about/something/else succeed.
  • /about/something/else fails with 404 (not matched by the router).

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-r3nnht

Logs

No response

System Info

System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1
    Memory: 73.06 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.11.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.19.2 - /opt/homebrew/bin/npm
  Browsers:
    Brave Browser: 109.1.47.171
    Firefox: 108.0.2
    Safari: 16.1
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0 => 1.0.1
    @sveltejs/kit: ^1.0.0 => 1.1.3
    svelte: ^3.54.0 => 3.55.1
    vite: ^4.0.0 => 4.0.4

Severity

serious, but I can work around it

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready to implementplease submit PRs for these issues!

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions