We are using DiscourseConnect through WP Discourse and have gone through the excellent setup guide here on meta. However, after the wordpress login appears, we’re redirected to the wordpress profile page instead of DIscourse. We are on Wordpress version 6.0.1 and WP Discourse version 2.4.5.
Go to forum page
Click login
Redirected to wordpress site /wp-login.php
Enter wordpress login information
Sent to /wp-admin/profile.php
If you type in the forum URL again, you’re redirected to the login page.
We’ve triple checked URLs and secrets, and they all are good. The users are in Wordpress and have verified email addresses. Any other ideas of where we should look?
Looking in the WP Discourse logs or the Admin logs on Discourse don’t seem to indicate anything interesting but I have included them here:
This is most likely a conflict with another plugin you’re using. When we’ve seen similar behavior in the past it was because another plugin was using a filter such as wp_redirect.
Please go through your list of plugins, deactivating them one at a time and trying to log in. Likewise if you have any custom code in your theme(s).
Thanks for the response. Any additional tips for tracing what plugins or custom code could be causing the issue? We’ve tried disabling all plugins and haven’t had any luck yet.
I’m sure it is some non-standard tweak that was made, but without having to rebuild the entire site from scratch, we’re having difficulty tracing what it might be.
If you’re able to search the non-core wordpress code running on your site, search for the strings
wp_redirect (a filter)
wp_login_url (a method)
parse_query (an action)
Check where any instances of those strings are found. In the past this has been caused by other plugins incorrectly using one of those filters, methods or actions.
I wish I could help you more but the issue here is not one being caused by the WP Discourse plugin. It’s an issue with some custom code in a theme, plugin or some other script in your Wordpress installation.
I can’t figure that out from here unfortunately, nor can the WP Discourse plugin log that in some way. Wordpress’ filters, methods and actions can be used by anything and the “priority” (i.e. the order in which things are run) can be overridden by anything as well.
We narrowed it down to a plugin from X-CD which is a conference and member management platform. We’ll be reaching out to them to see how they’re making changes to the login process that break the integration.