That’s not the problem. You’re forum is probably set to require authentication to read content from the site. There’s a bug in the wp-discourse plugin. The logout_from_discourse
function isn’t working for private forums. I’ll fix it and update the plugin later today or early tomorrow. I wanted to do an update anyway, because a new version of WordPress was released today.
You’re forum is probably set to require authentication to read content from the site.
Correct, our forum is protected. Please let me know when you update the plugin and I’ll test it out. Thanks!
It’s updated now. It’s version 1.3.8 in the WordPress plugin repo.
Awesome, thanks @simon. I just updated. Are there any settings I need to change in Discourse or WP? I just tried to log out of WordPress, but when I go to the forum I am still logged in?
I’ve tried it with a private forum in my development environment, both with and without the MemberPress plugin enabled and synced logout is working. I’ve tried it with a private forum on a production site and it’s working there too. I haven’t tried it with the MemberPress plugin enabled in production.
One thing to note is that on a private forum with SSO enabled, you can’t log out of Discourse when you are logged into WordPress. Discourse automatically logs you back in. That probably doesn’t have anything to do with what’s going on here though.
One thing that I found with the MemberPress plugin that is quite concerning is that users are able to login to Discourse without first confirming their email address. When using SSO through the wp-discourse plugin, it should only be possible to login directly to Discourse without an initial email confirmation when users are registered through the normal WordPress registration process. This is the first plugin I’ve tried that is not allowing the wp-discourse email verification function to be called. I think there’s a change I can make to the code so that it will work properly in all cases.
@simon Hmm, are there any settings I could be using in WP, MemberPress or Discourse that could be causing issues. I completely cleared the site cache and am still having issues. A few thoughts:
- These are what my SSO Provider settings look like in the WP Discourse plugin: http://share.ptlrdsgn.com/0p2r2p0e1M1k. Any issues there?
- These are my page options in MP: http://share.ptlrdsgn.com/191r1p083942. Any issues?
- These are my account options in MP: http://share.ptlrdsgn.com/0o1j2k463l27. Any issues?
Also, does it require a logout/login to update not only avatar, but also name and email in Discourse too? I was thinking that was automatic, but it looks to be having the same issues as the avatar.
We did notice that it doesn’t require you to confirm your email address. One of our team members received the email confirmation email from Discourse, but most of us have not. If you are able to fix that, that would be great—though I don’t think that is as big of an issue because during our signup process users will be paying for a membership, so they likely will use a real email address. If they do have a typo, they can edit it in their WP profile and it will sync with Discourse via the SSO setting.
That will be fixed in the next update - sometime tomorrow.
Yes, you’ll have to logout and login for it to take effect.
For the issue with syncing logouts, my guess is that it has something to do with your Rules settings. I’m not that familiar with MemberPress. In my development setup I haven’t created any rules and logout are syncing without any problem. If you’re logged into the admin section of your site, and logout through the admin bar (on the upper right corner move the mouse over your name and then select ‘logout’) does that make any difference?
@simon I just tested with my admin. Even if I log out using the admin bar link, it doesn’t seem to log out of the forum.
Interesting idea. Here are what my rules settings are: http://share.ptlrdsgn.com/2x08092G1T1K. Because the site is private, I am protecting all pages except the few that I exclude. Is there a specific page I should exclude that could be causing issues with the Discourse login integration?
I’m going to have to do a full setup of the MemberPress plugin in my dev environment to test this out. It might be a couple of days before I get the chance to do that. Syncing the logout between WordPress and Discourse is quite important, so we’ll figure it out. If you manage to solve the problem in the meantime, please let me know.
@simon Any way we could give you access to our install for you to play around with it there? We are launching our site next Wednesday, so I’d love to figure it out before then if we can. If you’d be willing to play directly in our install, let me know the best way to give you WP (and SFTP) access and I’ll send it over.
@simon and I worked privately to resolve the issue and wanted to share with everyone in case anyone else has the problem.
The issue was with the ‘Publishing Username’ in the WP Discourse plugin (see: http://share.ptlrdsgn.com/3d2P230G1Y0C). We had customized that to a different user, but our user was not an admin in Discourse. Any user you use in this field must be an admin in Discourse. We fixed that and the logouts sync as expected.
I’m going to update the plugin’s description of the Publishing Username field to say that it needs to be set to an admin user.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.