This topic has 22 replies, 4 voices, and was last updated 8 years by Radu.

  • Author
  • #133254
     arbolife
    Participant

    Hi,

    Facebook registration works well, but after the success it redirects to the user profile asking to complete it.

    Is there a way to redirect to the the original page ? It works really well with login, but not with registration.

    Thanks,

    Marc

    #133285
     ojaramil
    Participant

    That happens also to me. I can not register with facebook button

    #133604
     Laura
    Moderator

    Helo, can you share admin credentials so i can check it out? Do you have the latest update of the theme?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #133606
     ojaramil
    Participant
    This reply has been set as private.
    #133608
     ojaramil
    Participant
    This reply has been set as private.
    #133625
     arbolife
    Participant

    While I appreciate Laura helping Orlando, my original question remains open and is not the same as Orlando’s. Next time Orlando should consider creating his own ticket rather than highjacking someone else’s.

    My problem is not that Facebook registration does not work. Here’s my original post:

    Facebook registration works well, but after the success it redirects to the user profile asking to complete it.

    Is there a way to redirect to the the original page ? It works really well with login, but not with registration.

    Thanks,
    Marc

    #133739
     ojaramil
    Participant

    My apologize with you Marc, in the moment I posted first time I didn’t know how open a ticket and saw a similar subject in your post and I did it , now I learnt how to do it and a guy is helping me .

    Regards

    #134117
     Laura
    Moderator

    Hello @arbolife , The issue is the it redirects to the profile asking to complete it? Do you have any plugin activated that does this? Because its not like that by defaut

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #134895
     arbolife
    Participant

    Hi Laura,

    Today I went on my test site and deactivated all plugins except for BuddyPress, and clicked on “login with facebook” with a new user and it redirects me to the profile page (screenshot attached).

    So no, it’s not a plugin behaviour.

    The best would be to to have a code to put in functions.php to force the redirect to the originating page. Can you help me with this please ?

    Cheers,
    Marc

    Attachments:
    You must be logged in to view attached files.
    #134916
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #135004
     Radu
    Moderator

    Hi guys,

    Playing with those options it’s not enough ?

    If not you can use an advanced logic for this with the Peters Redirect plugin : https://wordpress.org/plugins/peters-login-redirect/

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #135070
     arbolife
    Participant

    Hi Radu,

    These options are for LOGIN and they work perfectly fine for me, when a user logs in it’s exactly what happens. My settings:
    LOGIN REDIRECT = Reload the current page
    HOMEPAGE REDIRECT = Disabled

    The question here is why REGISTRATION with Facebook (first time only) forwards to the user profile instead of reloading the current page.

    Couldn’t this be fixed with a line or two in functions.php rather than installing a plugin?

    Cheers,
    Marc

    #135114
     Radu
    Moderator

    The facebook login it behaves like that because maybe the user will complete the profile fields and other informations

    You can try this function…

    COPY CODE
    
    function custom_redirect_link_facebook_login(){
        
        global $post;
        $reloadcurrentpage = get_permalink( $post->ID );
        return $reloadcurrentpage;
    }
    
    add_filter('kleo_fb_register_redirect','custom_redirect_link_facebook_login', $user_ID);
    

    PS : I haven’t tested, let me know

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #135202
     arbolife
    Participant

    Hi Radu,

    Thank you, this is very close. I tried it on my test site from this page:
    https://www.arbolife.com/arbolife/fr/events/conference-zero-dechet-avec-bea-johnson

    and the page it forwarded after registration was:
    https://www.arbolife.com/arbolife/fr/events/conference-zero-dechet-avec-bea-johnson/false

    Of course the /false at the end generates a 404. Do you know how to remove this?

    Cheers,
    Marc

    #135296
     Radu
    Moderator

    Hi,

    Try with this code

    COPY CODE
    
    function custom_redirect_link_facebook_login(){
        
        global $post;
        $reloadcurrentpage = get_permalink( $post->ID );
        return $reloadcurrentpage;
    }
    
    add_filter('kleo_fb_register_redirect','custom_redirect_link_facebook_login');
    

    Let me know

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #135338
     arbolife
    Participant

    Hi Radu,

    Unfortunately it still shows the /false at the end of the pages’s URL and produces the same error. Any other idea?

    Cheers,
    Marc

    #135591
     Radu
    Moderator

    Hi,

    Ok try this instead

    COPY CODE
    
    function custom_redirect_link_facebook_login(){
        global $wp;
    	$current_url = home_url(add_query_arg(array(),$wp->request));
        return $current_url;
    }
    
    add_filter('kleo_fb_register_redirect','custom_redirect_link_facebook_login');
    
     
    
    

    Let me know

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #135754
     arbolife
    Participant

    Hi Radu,

    Now it loads the homepage, but not the current page from which I click on the log in with FB button.
    At least the /false is gone. Can you make it load the current page?

    Cheers,
    Marc

    #135842
     Radu
    Moderator

    Try with this

    COPY CODE
    
    function custom_redirect_link_facebook_login(){
        
        global $post;
        $reloadcurrentpage = get_permalink();
        return $reloadcurrentpage;
    }
    
    add_filter('kleo_fb_register_redirect','custom_redirect_link_facebook_login');
    

    LEt me know

    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #135927
     arbolife
    Participant

    Hi Radu,

    Thanks, but that produces the same result as the first two attempts, it creates a 404 error because there is again “/false” appended to the current page URL.

    I googled it realized the get_permalink(); was returning the false and your function was appending it to the end of the current page URL, so no need to get the current URL because it’s already there. Not adding anything to it might work. So I tried this – and I’m not a coder, but it worked:

    COPY CODE
    add_filter('kleo_fb_register_redirect','custom_redirect_link_facebook_login');
    function custom_redirect_link_facebook_login(){
        $reloadcurrentpage = "";
        return $reloadcurrentpage;
    }
    add_filter('kleo_fb_register_redirect','custom_redirect_link_facebook_login');

    Is this completely stupid to create a function to return nothing or should it do something else?

    Cheers,
    Marc

    #135979
     Radu
    Moderator

    Yes, it’s already there and it seems that the function returns the actual URL from where was called.
    IT seems to be odd using a function like this but practically it works.

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #136014
     arbolife
    Participant

    OK thanks for your help.

    Cheers,
    Marc

    #136100
     Radu
    Moderator

    Np

    Have a nice week

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 23 posts - 1 through 23 (of 23 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?