Topic-icon Issue JFBConnect and Gtranslate

Active Subscriptions:

None
4 years 3 months ago #66057 by fb_1627387670
Hi Alex,

So unfortunately, after many hours it still doesn't works so it wasn't a problem with servers propagation.

Hope we can find a solution.

Thank you
The topic has been locked.
Support Specialist
4 years 2 months ago #66075 by alzander
Alright.. I'm going to give you the minor code change that can get you going right away. I know you said you don't mind making a change, but if you'd like us to investigate further and figure out the underlying cause, please private message us FTP credentials to your site and we'll gladly investigate further. With the ability to implement code changes, we should be able to narrow things down quickly.

To fix immediately, edit the /components/com_jfbconnect/libraries/provider/facebook.php. Around line 290, you'll see:
"jfbc.base = '" . JURI::base() . "';\n" .
Change that too:
"jfbc.base = 'https://www.yoursite.com/';\n" .

I hope that helps get you going!

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

None
4 years 2 months ago #66078 by fb_1627387670
Hi Alex,

Thank for your help,

Unfortunately, applying this modification did no help, still no change with the login so I reverted back.

I will send you my credentials .

Thanks
The topic has been locked.
Active Subscriptions:

None
4 years 2 months ago #66097 by fb_1627387670
Hi Alex,

Credentials have been sent to you.

Thank for your support

Erik
The topic has been locked.
Support Specialist
4 years 2 months ago #66098 by alzander
Erik,
I've been investigating this morning but don't have any great details to share with you. What I've found out is below and hopefully something here will help you make heads or tails of what's going on as well:

* The authentication process is absolutely working with the /it/ domain. I can add code that checks that the user is authenticated after they click the Facebook button (or are auto-logged in). I've verified this with some code in the /components/com_jfbconnect/controllers/login.php file. You can do the same by uncommenting the 4 lines around 182. Once you do that, you'll get a blank page with the currently logged in user's information after you try to authenticate with Facebook. However, once redirected back to /it/, you are no longer logged in. I'm unsure if something is intentionally logging the user out or if there's a caching issue that's simply showing the /it/ page as if they aren't logged in, even though they are.
* Both /fr/ and /en/ (or the root /) *do* work. Those also happen to be the only flags showing in the top next to the 'Languages' area. Is there any other way that those languages are treated differently than the others that aren't shown (whether through settings in GTranslate or server type settings, like in .htaccess files)?
* If you successfully login on one of the pages above, and then click the "Logout" button, JFBConnect drops a special cookie called "jfbconnect_autologin_disable". That cookie is meant to prevent the automatic login process from starting again since the user just intentionally logged out. However, JFBConnect is still trying to log the user in. That would happen if the cookie isn't properly passed back, which could be a sign of aggressive caching somewhere.

From what I can see, everything within JFBConnect is working as it's supposed to, but something else is preventing (or actively logging out) the user from being logged in. If you have any ideas about caching, cookies or specific language configurations that may be conflicting or causing problems from the above testing, please let me know and we'll gladly help to continue investigating however we can.

Thanks,
Alex
The topic has been locked.
Support Specialist
4 years 2 months ago #66099 by alzander
One final note which I forgot, which may fix things enough for you anyways...

I changed the "Show 'Login Credentials' in popup" setting in the JFBConnect-> Configuration -> Facebook area to "No". Now, when a user tries to authenticate, they will be redirected to facebook.com instead of showing a popup to login with. This uses a separate authentication mechanism which doesn't seem to be affected by whatever weirdness is happening above. Please test and see if things work alright for you on different languages. If so, hopefully this is a good solution, but if not, let us know.

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

None
4 years 2 months ago #66100 by fb_1627387670
H Alex,

Thank you for this deep investigation.

It turns out that disabling Joonla cache (APC) allow the cookie jfbconnect_autologin_disable to work properly. However same issue with login.

Anyways, setting Show 'Login Credentials' in popup to No should do the trick for now. But I will investigate further more and try to find a solution, problem could also come from Gtranslate.php which is in root//gtranslate/

Thank you
The topic has been locked.