Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate <root> in 404 view when mixing @Route("") with @layout.tsx #20262

Open
Legioth opened this issue Oct 16, 2024 · 1 comment
Open

Duplicate <root> in 404 view when mixing @Route("") with @layout.tsx #20262

Legioth opened this issue Oct 16, 2024 · 1 comment

Comments

@Legioth
Copy link
Member

Legioth commented Oct 16, 2024

Description of the bug

In an application with a Flow view as for the root route and a client-side main layout, the dev mode 404 view contains two <root> entires. This is a regression between 24.4 and 24.5

Expected behavior

Expected to only have a single <root> entry in the 404 view.

Minimal reproducible example

  1. Create a project at https://start.vaadin.com/ with a single Flow view. Make sure Vaadin 24.5 is used as the platform version and React (Hilla) is used for the main layout.
  2. Launch using mvn
  3. Navigate to http://localhost:8080/foo or any other non-existing route

Versions

  • Vaadin / Flow version: Vaadin 24.5.0.rc2
@caalador
Copy link
Contributor

Seems like the RouteNotFoundError just collects server routes and then client routes without any checking of what there is. Also the client routes are not filtering away layouts which leads to having the 2 "" root targets.

The gotten client routes should filter Layout targets away from the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants