Topic-icon login page redirection

Active Subscriptions:

None
6 months 5 days ago #68756 by cissp
login page redirection was created by cissp
 I have an interesting find as I’m using SClogin module to let the users login with FBconnect and everything works as planned, Except, login redirection url.

I’m using easysocial as the registration componenet and the site is running in Arabic language which is RTL template style, when users login using SClogin module, they get routed to easysocial homepage as planned, however, the page is displayed in LTL and it displays the english version of the page not the arabic although there is no english menu item for the pae.  I’m experienced with joomla but I couldn’t figure this out. The menu item is in Arabic, there is no English menu, so I cant figure out the issue, any thoughts or guidance would be appreciated.
The topic has been locked.
Support Specialist
6 months 2 days ago #68760 by mel
Replied by mel on topic login page redirection
Can you inspect the register button to tell me what the anchor tag is pointing to? SCLogin uses the underlying EasySocial code to build the registration link when that extension is used as the Registration Component.

Mainly, does it have an itemId selected in the link? If not, do you have a menu item set for the Registration layout of EasySocial? If not, could you make a menu item for it and see if the behavior changes?

-Melissa
The topic has been locked.
Active Subscriptions:

None
6 months 2 days ago #68763 by cissp
Replied by cissp on topic login page redirection
Thank you for your quick reply. the issue is not with SClogin route after registration. it is the registration that happens using JFBconnect facebook and google registration button. when the new user registers via the JFBconnect facebook or google button they get automatically logged in to the English version of easysocial home and that is the problem. they should be rerouted to the easysocial page in arabic as it is the default language and the only menu item
The topic has been locked.
Support Specialist
6 months 2 days ago #68764 by mel
Replied by mel on topic login page redirection
Ah, I misread that the first time. This looks like a bug in JFBConnect. I was able to reproduce the issue on my site with a secondary language. The way we're building up the menu item link is not sufficient anymore without adding in the language. Previously just supplying an ItemId was enough for Joomla to route it to the correct language. This has probably been a bug for awhile on J4.

I have a couple lines of code to change. The following are the code changes. If you don't want to perform the changes yourself but would still like to test it out before a release, you can use the Contact Us form to send FTP credentials.

Code changes:
In /components/com_jfbconnect/libraries/utilities.php
line 192 change
$link = JFBConnectUtilities::getLinkWithItemId($item->link, $aliasedId);
to
$link = JFBConnectUtilities::getLinkWithItemId($item->link, $aliasedId, $item->language);

line 200, change
$link = JFBConnectUtilities::getLinkWithItemId($item->link, $itemId);
to
$link = JFBConnectUtilities::getLinkWithItemId($item->link, $itemId, $item->language);

line 210, change
static function getLinkWithItemId($link, $itemId)
to
static function getLinkWithItemId($link, $itemId, $language)

after line 221, add
if($language != '*')
   $url .= '&lang=' . $language;

-Melissa
The topic has been locked.
Active Subscriptions:

None
6 months 2 days ago #68766 by cissp
Replied by cissp on topic login page redirection
I trully appeciate your help, however, these changes didn't affect the redirection.
The topic has been locked.
Support Specialist
6 months 2 days ago #68767 by mel
Replied by mel on topic login page redirection
Can you provide a URL where I can see the behavior in action?
The topic has been locked.
Active Subscriptions:

None
The topic has been locked.
Support Specialist
6 months 2 days ago - 6 months 2 days ago #68769 by mel
Replied by mel on topic login page redirection
The page that you're redirected to after signing in with Google has an * for language meaning all languages (even though the code I provided excludes adding a language query string in that case).

Can you give me a direct link to see the EasySocial homepage properly in Right to Left also?
Last edit: 6 months 2 days ago by mel.
The topic has been locked.
Active Subscriptions:

None
6 months 2 days ago #68770 by cissp
Replied by cissp on topic login page redirection
I added the language code ar-AA to the code you provided

if($language != '*')
$url .= '&lang=' . $language;

here is the url to the correct page url: www.roar.academy/students-club/

and here it is without sef

roar.academy/index.php?option=com_easyso...dashboard&Itemid=134

or you can direct the users to the groups urls within easysocial via this url

roar.academy/index.php?option=com_easyso...ilter=all&Itemid=428

you can use any of the above two urls to set a direct redirection. thanks
The topic has been locked.
Support Specialist
6 months 1 day ago #68772 by mel
Replied by mel on topic login page redirection
When I attempt to visit your page, there's something else redirecting logins as well. If I log in with google using JFBConnect, most of the time, it redirects me back to the screen that has the login with a URL in the bar of something like the following www.roar.academy/index.php?option=com_li...velogins&view=action... Can you 1) verify that you're having the same behavior if this extension is disabled? 2) log out my user from the front-end so that I can log in again. It's limited right now.
The topic has been locked.