Title: Redirection URL
Last modified: September 3, 2019

---

# Redirection URL

 *  Resolved [wordformula](https://wordpress.org/support/users/wordformula/)
 * (@wordformula)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/redirection-url-4/)
 * Hi!
 * First, congratulation on this excellent plugin.
 * I am having an issue with the free version that came bundled with Flatsome theme.
   The authors of this theme have inserted some features that resemble your pro 
   version, i.e. login buttons in woocommerce pages.
 * I know that we did not actually buy your premium version, but we would like to
   sort out if the issue arises from the plugin, from the theme or from our wordpress
   installation.
 * Issue: social login works fine in the WP login page and in the my account page,
   but when the login is performed in the checkout page, the redirection URL is 
   wrong and fires a 404 error. I can see that the URL on the social icons include
   a correct redirection URL (e.g. [https://_OURSITE_.com/wp-login.php?loginGoogle=1&redirect=https%3A%2F%2F_OURSITE_.com%2Ffinalizar-a-compra%2F](https://_OURSITE_.com/wp-login.php?loginGoogle=1&redirect=https%3A%2F%2F_OURSITE_.com%2Ffinalizar-a-compra%2F)),
   but, after login, users are redirected to “[https://_OURSITE_.com/finalizar-a-compra/https:/_OURSITE_.com/finalizar-a-compra/&#8221](https://_OURSITE_.com/finalizar-a-compra/https:/_OURSITE_.com/finalizar-a-compra/&#8221);,
   which returns a 404 error.
 * Any hints?
 * Thanks,
    José Wordformula
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fredirection-url-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Laszlo](https://wordpress.org/support/users/laszloszalvak/)
 * (@laszloszalvak)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/redirection-url-4/#post-11896885)
 * Hi [@wordformula](https://wordpress.org/support/users/wordformula/)
 * The problem will be related to the custom button of your theme.
    If you inspect
   the HTML of your button, you will notice that, there is an onclick event on those
   buttons, for example the Facebook button:
 *     ```
       <a href="https://_oursite_.com/wp-login.php?loginFacebook=1&redirect=https%3A%2F%2F_oursite_.com%2Ffinalizar-a-compra%2F" class="button social-button large facebook circle" onclick="window.location = 'https://_oursite_.com/wp-login.php?loginFacebook=1&redirect=https%3A%2F%2F_oursite_.com%2Ffinalizar-a-compra%2F'+window.location.href; return false;"><i class="icon-facebook"></i>
       <span>Iniciar sessão com o Facebook</span></a>
       ```
   
 * As you can see the url of the current page is added with JavaScript:
    window.
   location.href after the URL. So the URL will look something like: [https://example.com/https:example.com](https://example.com/https:example.com)
   and that is the problem.
 * You can confirm this if you console.log the url you find in the onclick event
   like:
    `console.log('https://_oursite_.com/wp-login.php?loginFacebook=1&redirect
   =https%3A%2F%2F_oursite_.com%2Ffinalizar-a-compra%2F'+window.location.href);`
   and decode the URL. You will receive the url after the “redirect” url parameter
   where you will be redirected to.
 * Here is the URL decoded URL:
    [https://_oursite_.com/wp-login.php?loginFacebook=1&redirect=https://_oursite_.com/finalizar-a-compra/https://_oursite_.com/finalizar-a-compra/](https://_oursite_.com/wp-login.php?loginFacebook=1&redirect=https://_oursite_.com/finalizar-a-compra/https://_oursite_.com/finalizar-a-compra/)
 * So to fix the problem I would suggest either:
    -getting in touch with Flatsome-
   or manually replacing the social buttons of your theme with the social buttons
   of Nextend Social Login. Here you can find a guide: [https://nextendweb.com/nextend-social-login-docs/flatsome-replacing-social-buttons/](https://nextendweb.com/nextend-social-login-docs/flatsome-replacing-social-buttons/)
 * Ps.:
    As far as I know, Flatsome made their integration that way, if Nextend 
   Social Login Pro Addon is enabled, they will hide their custom social buttons.
   So if you have the Pro Addon installed, our buttons will replace the buttons 
   of Flatsome.
 * Note:
    If you would have also a questions related to the Pro Addon, then please
   rather open a support ticket: [https://nextendweb.com/contact-us/nextend-social-login-support/](https://nextendweb.com/contact-us/nextend-social-login-support/)
   Since here we can only provide help for the Free version.
 * Best regards,
    Laszlo.
 *  Thread Starter [wordformula](https://wordpress.org/support/users/wordformula/)
 * (@wordformula)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/redirection-url-4/#post-11900285)
 * Wow. That is a fast, comprehensive response!
 * Thank you! I will contact the theme developers.
 * We will also consider implementing your pro plugin across all our sites.
 * Best regards,
    José Wordformula

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Redirection URL’ is closed to new replies.

 * ![](https://ps.w.org/nextend-facebook-connect/assets/icon.svg?rev=3336394)
 * [Nextend Social Login and Register](https://wordpress.org/plugins/nextend-facebook-connect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextend-facebook-connect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextend-facebook-connect/)
 * [Active Topics](https://wordpress.org/support/plugin/nextend-facebook-connect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextend-facebook-connect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextend-facebook-connect/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [wordformula](https://wordpress.org/support/users/wordformula/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/redirection-url-4/#post-11900285)
 * Status: resolved