Skip to content

Page_url value in execution context includes base path when refreshing a page #205382

Open
@maryam-saeidi

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.

Metadata

Assignees

No one assigned

    Labels

    Team:CoreCore services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etcbugFixes for quality problems that affect the customer experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions