Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification: "Stats are booming" notification doesn't work when site URL contains a subdirectory #43991

Open
rachelmcr opened this issue Jul 8, 2020 · 1 comment
Labels

Comments

@rachelmcr
Copy link
Member

When WordPress is installed on a subdirectory, the link to the site's stats in the "stats are booming" notification doesn't work.

Steps to reproduce

  1. Start with a site with WordPress in a subdirectory.
  2. Install and activate the Jetpack plugin.
  3. Connect Jetpack to a WordPress.com account.
  4. Trigger the "stats are booming" notification or just visit this link that's used in the notification: https://wordpress.com/stats/day/SITE_BASE_URL?startDate=2020-07-06 where SITE_BASE_URL is the site URL without the subdirectory.
  5. Notice that you are taken to the All Sites stats view instead of the correct stats view for your site, at this URL: https://wordpress.com/stats/day?site=SITE_BASE_URL
  6. Visit the link again, but add the site's subdirectory like this: https://wordpress.com/stats/day/SITE_BASE_URL::SUBDIRECTORY?startDate=2020-07-06 (note the :: between the base URL and the subdirectory). Notice the correct stats view now loads.

What I expected

I expected the notification to contain a link to the site's stats with the specified date highlighted.

What happened instead

The link doesn't contain the full site URL (including the subdirectory) so it redirects to the All Sites stats view instead.

Browser / OS version

Chrome 83.0.4103.116 / macOS 10.15.5

Screenshot / Video

Example site URL: https://magenta-cod.jurassic.ninja/subdir/
Correct stats link: https://wordpress.com/stats/day/magenta-cod.jurassic.ninja::subdir?startDate=2020-07-06
Link as formatted in the notification: https://wordpress.com/stats/day/magenta-cod.jurassic.ninja?startDate=2020-07-06

Actual stats view Expected stats view
Screenshot 2020-07-08 15 09 33 Screenshot 2020-07-08 15 09 24

Context / Source

Reported by @sararosso in Slack (internal ref: p1594072063135700-slack-automattic) and reproduced on a test site.

@github-actions
Copy link

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant