Page_url value in execution context includes base path when refreshing a page #205382
Open
Description
Summary
As shown below, when navigating to the SLO page by refreshing the page or navigating within the app, it can result in a different page_url:
Navigation | page_url value |
---|---|
By refresh | /s/test/app/slos/welcome |
By navigating within the app | /app/slos |
The correct URL, in this case, should be /app/slos/welcome,
which is not the case in any of the above scenarios.
Screen.Recording.2025-01-02.at.13.31.49.mov
Implementation hint
Input from @dgieselaar :
it’s probably just this:
https://github.com/elastic/kibana/blob/f2a50ef30de03d1da9da3b968892ada5300024bf/sr[…]ckages/application/browser-internal/src/application_service.tsx
this initially uses window.location, which doesn’t strip the base path, and then after any change (push/replace) it uses history.location. I assume the fix is as simple as using history.location from the start, but not sure.
Acceptance criteria
- Fix the page_url value to include the whole URL path without the base path both when refreshing the page and navigating within the app.