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

Masterbar: logging out of your site does not log you out of WordPress.com #12456

Closed
jeherve opened this issue May 23, 2019 · 0 comments · Fixed by #12457
Closed

Masterbar: logging out of your site does not log you out of WordPress.com #12456

jeherve opened this issue May 23, 2019 · 0 comments · Fixed by #12457
Labels
AMP [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Pri] High [Type] Bug When a feature is broken and / or not performing as intended

Comments

@jeherve
Copy link
Member

jeherve commented May 23, 2019

Steps to reproduce the issue

  1. Check out Masterbar: Revert recent changes #12454
  2. Activate the WordPress.com Toolbar feature on your site, under Jetpack > Settings > Writing
  3. Make sure you are logged in with your WordPress.com account.
  4. In the masterbar, click on your gravatar.
  5. Click sign out.
  6. You will be signed out of your site, but not from WordPress.com.

In fact, as soon as you log out the Masterbar module stops loading, and thus this is never triggered:

add_action( 'wp_logout', array( $this, 'maybe_logout_user_from_wpcom' ) );

-- https://github.com/Automattic/jetpack/pull/12454/files#diff-d73a71fc4f0617de9989f4321bc4f39cR145

This appears to be caused by #10945 and #11088, which defered loading of the module altogether. Logging out of WordPress.com worked before those changes.

@jeherve jeherve added [Type] Bug When a feature is broken and / or not performing as intended [Pri] High [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations AMP labels May 23, 2019
jeherve added a commit that referenced this issue May 23, 2019
Fixes #12456

This change avoids initialiazing all of the Masterbar after admin_bar_init. We want the module to be available after logging out as well, so the function hooked into wp_logout can be triggered.
jeherve added a commit that referenced this issue May 24, 2019
Fixes #12456

This change avoids initialiazing all of the Masterbar after admin_bar_init. We want the module to be available after logging out as well, so the function hooked into wp_logout can be triggered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMP [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Pri] High [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant