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

Router uses wrong base url when deploying using a context path #409

Closed
Artur- opened this issue Oct 28, 2019 · 2 comments · Fixed by #410
Closed

Router uses wrong base url when deploying using a context path #409

Artur- opened this issue Oct 28, 2019 · 2 comments · Fixed by #410
Assignees
Labels
bug Something isn't working hilla
Milestone

Comments

@Artur-
Copy link
Member

Artur- commented Oct 28, 2019

  1. Download project from start.stg.vaadin.com using "TypeScript + Spring Boot"
  2. Add server.servlet.context-path=/foo to src/main/resources/application.properties
  3. Change /dashboard route to /dash/board in frontend/index.ts
  4. Remove ...serverSideRoutes from frontend/index.ts
  5. Run using mvn
  6. Open http://localhost:8080/foo/dash/board

Expected:
Dashboard view is shown

Actual:

Uncaught (in promise) Error: [Vaadin.Router] Page not found (/foo/dash/board)
    at getNotFoundError (vaadin-router.js?6718:154)
    at eval (vaadin-router.js?6718:1834)
@Artur-
Copy link
Member Author

Artur- commented Oct 28, 2019

If you edit the menu to link to dash/board instead of dashboard, then you can open http://localhost:8080/foo/masterdetail and navigate to dash/board by clicking BUT a refresh then results in the same exception

@Artur-
Copy link
Member Author

Artur- commented Oct 28, 2019

When you open http://localhost:8080/foo, then
router.__effectiveBaseUrl is `"http://localhost:8080/foo/"

on the other hand, when you open http://localhost:8080/foo/dash/board then
router.__effectiveBaseUrl is "http://localhost:8080/"

Feels a bit like the relative base url is applied twice

@vlukashov vlukashov added bug Something isn't working hilla labels Oct 29, 2019
@vlukashov vlukashov added this to the CCDM MVP milestone Oct 29, 2019
@qtdzz qtdzz self-assigned this Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants