Wp-calypso: Viewing /sharing directly redirects to /stats

Created on 11 Dec 2017  路  6Comments  路  Source: Automattic/wp-calypso

Brought up in 840409-zen.

Steps to reproduce

  1. Starting at WordPress.com
  2. Navigate to /sharing/yoursiteurl
  3. It will load fine. From there, copy the sharing URL and open it in a new tab.
  4. If you try to load it directly, it will redirect to stats.

Alternatively, just try opening https://wordpress.com/sharing/SITEURL directly.

What I expected

I expected to be able to use https://wordpress.com/sharing/mysiteurl without it redirecting to stats.

What happened instead

The sharing link redirects to /stats.

Screenshot / Video

https://cloudup.com/csZhUxKluAV

Jetpack Sharing [Pri] High [Type] Bug

Most helpful comment

This is a regression from #20192. Me and @jsnajdr will look into it during weekend or asap.

All 6 comments

I tested and confirmed this issue for Jetpack/Atomic sites. (Simple sites work as expected.)

I also observed the issue with the following steps:

  1. Starting at URL: https://wordpress.com/
  2. Select My Sites.
  3. Select a WordPress.com Simple site.
  4. Select "Sharing" from the sidebar to open the Sharing section.
  5. Select "Switch Site" in the sidebar.
  6. Select a Jetpack or Atomic site.

Result: You are redirected to the All Sites Stats page instead of Sharing for the selected site. (This only occurs the first time you switch to that site with these steps.)

This could be happening at two places in my-sites/controller: jetpackModuleActive or createSitesComponent

This came up also at p4TIVU-8Mo-p2

Reported in ticket 834449-zen

I tested with one site on this user's account after the user reported that they鈥檙e not able to access sharing settings.

When clicking the sharing link in the calypso dashboard for the affected site, to https://wordpress.com/sharing/SITEADDRESS it鈥檚 instead just redirecting to https://wordpress.com/stats

In this case, even visiting the direct URL when logged in (in an incognito window) makes the redirect occur. I was unable to find a way to access the sharing settings for this site.

It doesn鈥檛 seem like it happens for every site, but on this user鈥檚 account it is also happening on at least one other sit.

When testing with my own account, with many of my test sites the first time I click the sharing link the redirect happens, but going back and trying again it seems to go through to the right location.

Tested and confirmed that clicking My Sites > Sharing results in a redirect to /stats for Jetpack sites using the following testing steps:

  1. Log in to any WordPress.com account with access to a Jetpack site.
  2. Go to My Sites > Switch Site and select a Jetpack site.
  3. Go to My Sites > Sharing and check to see if the page loads normally.
  4. If Sharing settings load, try refreshing the page.
  5. Try loading https://wordpress.com/sharing/SITEURL directly.
  6. Repeat for other Jetpack sites.

Result: sometimes the sharing settings page loads and sometimes it redirects to All Sites > Stats. When the page does load, refreshing the page causes the redirect again. When I try to load https://wordpress.com/sharing/SITEURL directly, I am always redirected to /stats.

Video: 1m23s
Seen at https://wordpress.com/stats/day/bh.testjetpack.blog::sub running WordPress 4.9.1 and Jetpack 5.7-beta-16672-ee48b7e-master hosted at Bluehost using Chrome 63.0.3239.84 on Mac OS X 10.13.1.

I couldn't replicate for my own blog, but when I test the squaremunkey account I see the following response header in Chrome Developer Tools > Network > [search for "sharing"]:

{"code":400,"headers":[{"name":"Content-Type","value":"application\/json"}],"body":{"error":"rest_invalid_signature","message":"La requ\u00eate n’est pas correctement sign\u00e9e."}}

This is a regression from #20192. Me and @jsnajdr will look into it during weekend or asap.

Also raised in 840016-zen.

Was this page helpful?
0 / 5 - 0 ratings