Wp-calypso: My Sites: My Sites section breaks if an inactive Jetpack site is the primary site on account

Created on 27 Apr 2018  Â·  16Comments  Â·  Source: Automattic/wp-calypso

The My Sites section breaks in one of two ways if an inactive Jetpack site is the primary site on the account:

  1. If the Jetpack site was the only site on the account, the My Sites section doesn't open at all.
  2. If there are other sites on the account, only the All Sites view opens. The active site(s) are not accessible under My Sites.

More context about inactive Jetpack sites (and how they are identified as inactive) in p7rcWF-My-p2 (internal ref). For testing this issue, you can add the is_disconnected sticker to the site by toggling that setting on in the site report card. This will mark the site as inactive.

Steps to reproduce

Scenario 1:

  1. Set up a temporary self-hosted site with Jetpack and connect it to a new WordPress.com account with no other sites.
  2. Delete the site or take it offline.
  3. In the site's report card, enable the is_disconnected toggle.
  4. Visit https://wordpress.com/ and open the My Site section.

Scenario 2:

  1. Set up a temporary self-hosted site with Jetpack and connect it to a new WordPress.com account with no other sites.
  2. Create a new WordPress.com site on the same account.
  3. Delete the Jetpack site or take it offline.
  4. In the site's report card, enable the is_disconnected toggle.
  5. Visit https://wordpress.com/ and open the My Sites section.

What I expected

In Scenario 1 I expected to open the My Site section and see a message that I had no sites.

In Scenario 2 I expected to see my WordPress.com site.

What happened instead

In Scenario 1 I was stuck on the Reader — the My Site section didn't open:

screenshot 2018-04-27 12 36 55

In Scenario 2 the My Sites page opened to the All Sites view and the site switcher didn't appear:

screenshot 2018-04-27 16 03 12

Note: In both scenarios the Primary Site setting in my account settings at https://wordpress.com/me/account was also broken:

Scenario 1:
screenshot 2018-04-27 12 37 06

Scenario 2:
screenshot 2018-04-27 12 37 57

Browser / OS version

macOS/Chrome

Context / Source

user-report p2EDhh-o3-p2 cc @kamikazeballoon

Jetpack Sites [Pri] Low [Status] Needs Review [Type] Bug

All 16 comments

Found something similar ref 1185471-zen, Blog ID 144083544.

Of note, this user did not previously have a WP.com site and the site is public. Does not have is_disconnected sticker.

Upon further checking, there was no Primary Site set, thus showing All My Sites:
screen shot 2018-05-29 at 16 18 44

In 1212616-zen, the user has 2 Jetpack sites and a hidden WordPress.com site. One of the Jetpack sites is not properly connected but they contacted us about the site that IS connected. There was no way to view the site that they were asking about and created lots of confusion for us. In fact, when accessing the account, only the HIDDEN WordPress.com site is showing. Neither Jetpack site is accessible.

1216989-zen the primary site was no longer connected to JP and My Sites would not load. Changing the primary to another site resolved the issue.

I expected: If a primary site on JP is no longer active the primary should change to an active JP site.

1223532-zen

Also posted here: p2EDhh-uC-p2

This issue has been marked as stale and will be closed in seven days. This happened because:

  • It has been inactive in the past 9 months.
  • It isn't a project or a milestone, and hasn’t been labeled `[Pri] Blocker`, `[Pri] High`, `[Status] Keep Open`, or `OSS Citizen`.

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.

2535991-zen
blog_id = 146988038

2580671-zen
blog_id = 80901474

From what I notice in Blog RC, jetpack-site-purged is added in two sites in my reports.
It seems when purging unconnected JP sites, we need to disconnect these sites from the user too.

@westi you worked on the purging un-used Jetpack sites project so you may have a look at this?

2822102-zen
blog_id 138625632

Similar to my report above https://github.com/Automattic/wp-calypso/issues/24539#issuecomment-568960118, this site has this sticker jetpack-site-purged in blog RC

3281323-zen

The customer in 3458880-zen had three sites in their primary account (chineusedegrenier) with broken connections because the sites are no longer online. Because of this, they weren't able to access the active site with a Jetpack plan in their WordPress.com dashboard.

So they bought a new plan in a new account. Which royally messed up all of their backups and got things terrifically confused for all of us.

This might seem like a low priority minor bug but for Jetpack users it is significant, particularly given that we don't proactively remove "connections" to sites that are no longer loading or online.

All three sites in this case had the is_disconnected sticker but none had communciated with our servers in a year or more.

@kraftbj I'm wondering how many other users are experiencing this same issue. Can we find out how many Jetpack users have primary sites with the is_disconnected sticker?

There is literally nothing that users can do here and no way for them to know why they can't see their connected site. When we add the disconnected sticker, is there any way to remove the ability for it to be a primary site?

@kraftbj any insight you can offer on the matter?

I'm not sure there's a good way to determine the scope of this since we'd need to scan through all of the users, pull out the primary site, then check to see if it is disconnected or not.

While updating the primary site if "is_disconnected" is one approach, that flag is automatically removed if the site begins communicating again (e.g. let's just say their server is offline or something).

The other approach is figuring out what is breaking in Calypso and hardening to provide a better experience, which is probably the route to go.

Would figuring out the latter make sense to y'all?

The other approach is figuring out what is breaking in Calypso and hardening to provide a better experience, which is probably the route to go.

This should do!

@tmmbecker Any thoughts?

Would figuring out the latter make sense to y'all?

Thanks Kraft! If figuring out the latter results in a fluid customer experience when their primary site has a borked connection, then that makes sense. I don't think the solution matters here so much as the end result - users need to be able to see all sites even when the primary site is not actively and successfully connected.

Right now, they are just stuck with no way to self-help.

Was this page helpful?
0 / 5 - 0 ratings