Bug Description
Please describe.
We can create links directly to dashboards, including those that have query_variables options in the URL. However, this parameter only works when a trailing %20 (encoded space) is appended to the URL. Without it, the variable is ignored on initial load and the dashboard renders with the default value instead. This affects any use of query_variables for linking to dashboards with pre-applied variable overrides.
We should not require the %20 at the end of the URL in order for these overrides to work.
How to reproduce
- Create a dashboard which uses a
query_variable. Example here.
- Set a value in the override and notice the URL changes. I have used the value
Polukranos, Unchained in this example.
- Notice that the URL adds the values and adds a suffixed
%20
- If you remove the
%20 (or forget) then the override doesn't work.
For example, this URL works and immediately loads with the filters applied:
https://us.posthog.com/project/311650/dashboard/1445149?query_variables={"card_name":"Polukranos, Unchained"}%20
However, the same URL without the encoded space at the end fails to apply the override:
https://us.posthog.com/project/311650/dashboard/1445149?query_variables={"card_name":"Polukranos, Unchained"}
Additional context
Debug info
Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019d6e8c-f87c-76c6-b969-deea74bf9c6e?t=1579
Admin: http://go/adminOrgUS/019c4ed6-add0-0000-998a-30c999608349 (project ID 311650)
Bug Description
Please describe.
We can create links directly to dashboards, including those that have
query_variablesoptions in the URL. However, this parameter only works when a trailing %20 (encoded space) is appended to the URL. Without it, the variable is ignored on initial load and the dashboard renders with the default value instead. This affects any use ofquery_variablesfor linking to dashboards with pre-applied variable overrides.We should not require the
%20at the end of the URL in order for these overrides to work.How to reproduce
query_variable. Example here.Polukranos, Unchainedin this example.%20%20(or forget) then the override doesn't work.For example, this URL works and immediately loads with the filters applied:
However, the same URL without the encoded space at the end fails to apply the override:
Additional context
Debug info
Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019d6e8c-f87c-76c6-b969-deea74bf9c6e?t=1579 Admin: http://go/adminOrgUS/019c4ed6-add0-0000-998a-30c999608349 (project ID 311650)