From last week I have a problem. Every time user logins or sign-up's from login/registration page or widget it is redirected to home page, event if I have selected custom URL or current page. It was working fine for few months and redirecting to the page I wanted.
I tried to reinstall plugin, but this didn't help. When trying to edit includes/communication.php it didn't had any effect too.
Where could I check why this is happening?
Thank you!
Answers
Just to clarify: the user is logged in, but redirected to the home page, instead of the URL he was on ?
Regards.
Yes. After the user logins he suppose to go to my selected page, but every time he is redirected to home page. Even when I changed in settings, that I want to redirect in dashboard or current page, it still goes to home url.
When I edited includes/communication.php file and inserted echo something and exit in different places of the code, this doesn't change anything, code runs as usual (redirects to home page) even if it has to stop somewhere in the middle.
The interesting part is that it was working just fine for few months and one day just stopped.
When you say that it was working before, maybe now another plugin is redirecting the user after login (Rules for example).
Do you know how your setup changed over the last weeks?
Hope this helps.
Since then I have installed only "WP Smush", "P3 plugin-performance-profiler" and "WP-optimize" plugins, but I have disabled all of them when I started having this problem and deleted them now.
Also I have deactivated and activated "OA Social Login" plugin and after this didn't helped I reinstalled it.
Do you need any other settings?
Unfortunately these settings do work on a local install.
Maybe you can try the URL redirection troubleshooting tips (https://codex.wordpress.org/Login_Trouble#Site_URL_Redirecting).
Another way would be, if you are not running a live site, to set debug on.
I am using Buddypress and BBpress as well and I had issues with Theme My Login so I installed BP Login Redirect, which redirects all normal sign ins to the right place. Only when users sign up via Social Login they always to the homepage instead of a subpage.
We also use a Multisite Network, but as users registrations are only handled on the main page, it should not be affected by it.
Ay further idea?
@Expert_Dojo: do you also use Theme My Login ? Or any other plugin so I can try to reproduce your errors.
Thanks.
Both tests should display green success message. If the connection does not work properly, then the plugin will redirect the user to the homepage when he logs in.
Please also have a look at the functions.php file of your theme. Search for the value oa_social_login and make sure that you aren't redefining the redirection urls with a custom action.
Yes, Autodetect and Verfify show green messages. We did not update the oa_social_login with redirects.
If the user role assigned by Social Login is causing the problem, you can look at this discussion:
https://support.oneall.com/forums/discussion/comment/1009/#Comment_1009
Hope this helps.
Thanks for your enduring support. I appreciate your work and very happy using it. Will definitely recommend it further.
Chris
edit: this post was in to Chris Kruppa.
We have a code change that might help (at least with one the plugin you use).
Before we add it to our next plugin release, could you possibly try it out? (it will be added in a week or so)
In one of our plugin files:
(your wordpress directory)/wp-content/plugins/oa-social-login/includes/communication.php,
add this line:
$redirect_to = apply_filters ('login_redirect', $redirect_to, NULL, $user_data);
, just before://Filter for redirection urls if ($new_registration === true) {
which should be at about line 472.Hope this helps.
Yes, that's correct.
The redirection behaviour depends on how the different plugins integrate with Wordpress, and if they can "collaborate" via the standard Wordpress hooks.
We can't promise that all plugins will work with OneAll Social Login, but we can try to hook into more standard Wordpress hooks. Apparently not enough for S2.
Also, it is possible to change the roles attributed by Social Login, if needed.
For more info you could read and follow this thread in "S2 member framework" support forum https://wordpress.org/support/topic/problem-with-oa-social-login?replies=3
The link you provided shows how you can redirect logged in users with S2 Member.
We were able to observe your current behaviour (S2 redirection works when logging in with OA Social Login, but to a fixed URL).
The S2 Member plugin interrupts the login OA procedure just before redirection (we call all hooks for integration with other plugins), and clears filters for login redirection.
There is not much we can do here unfortunately.
I will probably try other membership plugin to see if it works together with OA.
Big thanks again for your patient
For more info and solution read here https://wordpress.org/support/topic/problem-with-oa-social-login?replies=13