Topic-icon Subdomain redirection

Active Subscriptions:

None
9 years 8 months ago #47048 by fb_710072567
Hi Alex,

So I'm using Gtranslate now and everything works fine except for the redirect after logging in. When loggin in on en.foedies.com you get redirected to foedies.com. This is similar Haim's issue: www.sourcecoast.com/forums/jfbconnect/jf...esh-losing-subdomain

I've tried using his solution and made a couple of alterations. I put the following code in 'components/com_jfbconnect/libraries/provider/facebook.php':
$returnLang = $_SERVER['HTTP_X_GT_LANG'];
        if (!$returnLang)
            $returnBase = "http://www.foedies.com/";
        else
            $returnBase = "http://"  . $returnLang . ".foedies.com/";
        $doc->addCustomTag('<script type="text/javascript">' .
        $logoutFacebookJavascript . "\n" .
        "jfbc.base = '" . $returnBase . "';\n" .
        "jfbc.return_url = '" . base64_encode($return) . "';\n" .
        "jfbc.login.scope = '" . $requiredPerms . "';\n" .
        "jfbc.login.show_modal = '" . $showLoginModal . "';\n" .
        "jfbc.login.use_popup = " . ($this->configModel->get('login_use_popup') ? 'true' : 'false') . ";\n" .
        "jfbc.login.auto = '" . $this->configModel->get('facebook_auto_login') . "';\n" .
        "jfbc.login.logged_in = " . (!$user->guest && JFBCFactory::usermap()->getProviderUserId($user->id, 'facebook') ? 'true' : 'false') . ";\n" .
        "jfbc.token = '" . JSession::getFormToken() . "';\n" .
        $debugCmd .
        "jfbc.init();\n" .
        "</script>");

This doesn't work though. Is there something wrong with the code or did I place in the wrong file? Maybe tere's another solution?

Site: foedies.com
English site: en.foedies.com (Gtranslate)

Regards,

Sander
The topic has been locked.
Support Specialist
9 years 8 months ago #47081 by alzander
Replied by alzander on topic Subdomain redirection
What do you have set for the "Returning User Redirection" setting in JFBConnect? Please try setting that both to a menu item and to "Same Page" to see if one has the desired effect. That will help us narrow down what may be going wrong with the 'other' mode.

The code above, so you know, looks right. I also verified it on the page of your site and it looks good.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 8 months ago #47100 by fb_710072567
Replied by fb_710072567 on topic Subdomain redirection
Hi Alex,

I tried the following scenario's:
1. redirection 'same page' >> visit en.foedies.com >> redirected to foedies.com
2. redirection 'kookclub.html' >> visit en.foedies.com >> redirected to foedies.com/kookclub.html

Is there something else I can try?

Gr,

Sander
The topic has been locked.
Active Subscriptions:

None
9 years 7 months ago #47438 by fb_710072567
Replied by fb_710072567 on topic Subdomain redirection
Hi Alex,

Do you have any news on this topic? After the update I changed the code again, but it still doesn't work. Would be great if this would work.

Regards,

Sander
The topic has been locked.