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

Jetpack problems on a new site #702

Closed
CdrMarks opened this issue Oct 8, 2021 · 5 comments
Closed

Jetpack problems on a new site #702

CdrMarks opened this issue Oct 8, 2021 · 5 comments

Comments

@CdrMarks
Copy link
Collaborator

@CdrMarks CdrMarks commented Oct 8, 2021

Describe the bug

Two issues.

  1. As a WordCamp organizer with the Administrator role, I was unable to connect a new WordCamp site to Jetpack using my WordPress.com account.
  2. As a logged out user, I didn't see contact form while Coming Soon mode was enabled when accessing the homepage.

To reproduce

Steps to reproduce the behavior:

  1. Go to 'https://birmingham.wordcamp.org/2022/wp-admin/admin.php?page=jetpack#/connect-user
  2. Click on the 'Connect your user account' button.
  3. Button text changes to spinning icon
  4. See in Chrome's Network Tools a 403 error for the URL https://birmingham.wordcamp.org/2022/wp-json/jetpack/v4/connection/authorize_url?no_iframe=1&redirect_uri=admin.php%3Fpage%3Djetpack&_cacheBuster=1633721213843

Steps to reproduce the behavior:

  1. Logout of the site or use an incognito browser
  2. Browse to https://birmingham.wordcamp.org/2022
  3. Form was missing (this problem resolved itself after Erica disconnected and reconnected the site.)

Additional discussion about this occurred in Slack.
https://wordpress.slack.com/archives/C08M59V3P/p1633721338008900

Expected behavior

Be taken to WordPress.com so I can login.

and

See the form on the homepage.

Screenshots

image
image

WordCamp

https://birmingham.wordcamp.org/2022/

System (please complete the following information):

  • Device: Laptop
  • OS: macOC Big Sur v11.6
  • Browser Chrome
  • Version 94.0.4606.71 (Official Build) (x86_64)
@dd32
Copy link
Member

@dd32 dd32 commented Oct 11, 2021

Click on the 'Connect your user account' button.

Confirmed as a non-super-admin.

The cause of this is that endpoint in Jetpack is using the jetpack_connect capability, which uses the jetpack_disconnect capability, which on multisite only allows super admins (unless $this->get_option( 'sub-site-connection-override' ) which isn't true for WordCamp).
The appropriate capability in this scenario appears to be the jetpack_connect_user cap.

I've tested it on the birmingham and testing site, so I believe this prevents all "non-super admin" users on all sites from connecting their accounts.

Form was missing

I can't test this, but this deserves its own issue IMHO.

@kraftbj
Copy link

@kraftbj kraftbj commented Oct 15, 2021

Jetpack is working on an issue involving non-admin users having trouble connecting, but this looks like it might be slightly different. I'm asking the team to take a look at it.

@kraftbj
Copy link

@kraftbj kraftbj commented Oct 19, 2021

Can we try again with Jetpack 10.2.1 which shipped today @iandunn ?

There were a few related-but-separate issues with secondary connections and 10.2.1 resolves the known ones before further investigation on this one specifically.

@iandunn
Copy link
Member

@iandunn iandunn commented Oct 21, 2021

It's updated now 👍🏻

@CdrMarks
Copy link
Collaborator Author

@CdrMarks CdrMarks commented Oct 21, 2021

I was able to connect the Birmingham 2022 site now. Thanks guys!

I think this can be closed.

@iandunn iandunn closed this Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants