analytics icon indicating copy to clipboard operation
analytics copied to clipboard

Shared link filtering and "Details" menus break the URL, removing the "/share" string

Open pviprey opened this issue 4 years ago • 5 comments

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

pviprey avatar May 14 '21 18:05 pviprey

Thanks for reporting! We'll take a look

ukutaht avatar May 17 '21 08:05 ukutaht

Same issue if applying any filters, the client-side history updating isn't preserving /share and that breaks the link.

bz2 avatar Aug 24 '21 12:08 bz2

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.

bz2 avatar Aug 24 '21 12:08 bz2

All correct. Thanks @bz2

ukutaht avatar Aug 25 '21 13:08 ukutaht

Confirmed that I am also experiencing this issue.

Steps to recreate:

  1. Open a private shared link url
  2. Apply a filter using the custom ui overlay
  3. 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

cwaring avatar Jun 13 '23 08:06 cwaring