Shared link filtering and "Details" menus break the URL, removing the "/share" string
Prerequisites
- [x] I have searched open and closed issues to make sure that the bug has not yet been reported.
Bug report
This bug happens when using a private shared link. When clicking on 'DETAILS' on any windows for more details it updates the URL but removes the '/share' from it which will result in an infinite loop on the differents datas when you refresh the website/reopen the page after closing it earlier. Going back to the original page is also not enough as I still need to refresh it no matter what to get the datas.
Expected behavior Load the datas whenever the site is resfresh or reopen later.
Environment (If applicable):
- OS: Pop_OS
- Browser: firefox
- Version 88.0.1
Thanks for reporting! We'll take a look
Same issue if applying any filters, the client-side history updating isn't preserving /share and that breaks the link.
The pathname of the <Link/> components are wrong:
https://github.com/plausible/analytics/blob/c95d37583952cbad2e25c2cf9dda9a7b20b155f6/assets/js/dashboard/stats/more-link.js#L9
https://github.com/plausible/analytics/blob/6e997e7e5d35647a750ed27290edd4dd800d6255/assets/js/dashboard/filters.js#L93
Either need a bit passed in to represent share/not-share and include that, or have another abstraction that can correctly generate a base path.
All correct. Thanks @bz2
Confirmed that I am also experiencing this issue.
Steps to recreate:
- Open a private shared link url
- Apply a filter using the custom ui overlay
- The
/share/path is removed from the url, thus breaking the url if it is copied and pasted to a new anonymous session
Notes:
- Filters applied by clicking the links in pages list do not break the share url
- If you add the
/share/path back into the url the functionality is restored