Topic-icon Joomla Login Redirection URL always to profile with patch to J 3.4.6

Active Subscriptions:

None
I redirect my users to a homepage, after a succesfull login. But after I patched my Joomla website to 3.4.6, the redirect didnt work anymore: it leads to the profile page. Before 3.4.6 SC login worked like well; redirect all logged in people to the right page.
The topic has been locked.
Active Subscriptions:

None
My site is doing the same thing. Just upgraded to Joomla 3.4.6 & SCLogin 4.5.1. No matter what I do, every time a user logs in, they are redirected to the profile page.

Thanks.
The topic has been locked.
Support Specialist
Thanks for the reports. We're investigating further, but think we have a quick fix if you are up for making a small code change.
The change is in the /modules/mod_sclogin/helper.php file. Around line 297, you'll see:
if ($router->getMode() == JROUTER_MODE_SEF)
                            $url = 'index.php?Itemid=' . $itemId;
                        else
                            $url = $item->link . '&Itemid=' . $itemId;
Change that to just:
$url = 'index.php?Itemid=' . $itemId;
                           return $url;
Before we can release it, we need to test in many different modes (SEF, non-SEF, 3rd party SEF, with a page set, with 'same page' set, etc), so it will take some time, Your feedback is very appreciated on if it works for you!

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

None
I think it indeed has to do something with SEF. And some extra input filtering in Joomla 3.4.6

I will test it.
The topic has been locked.
Active Subscriptions:

None
8 years 4 months ago - 8 years 4 months ago #56014 by markboos
Your code change did solve my problem (in a SEF enabled website) WHEN I redirect to an existing page. When I redirect after login to "Same page" then it doesnt work.

The following posts explain why this problem emerges is in security patch 3.4.6:
github.com/joomla/joomla-cms/issues/8689

"To be clear, as the docs are not, the redirect url MUST be an internal url, it MUST start with index.php? and be a non-sef url.

Examples:
index.php?option=com_content&view=article&id=38"
Last edit: 8 years 4 months ago by markboos.
The topic has been locked.
Support Specialist
Thanks for the link. We are on top of that bug report and looking at the best way to refactor our code to implement the change for both 3.4.6 sites and for some backward compatibility with older 3.x and 2.x sites. It may take a few days to get a reliable solution out though, but rest assured, we'll get a fix out soon.

Thanks again for the reports and your patience. We were blindsided by this change in 3.4.6 just like everyone else.

Alex
The topic has been locked.
Active Subscriptions:

None
8 years 4 months ago - 8 years 4 months ago #56031 by prin0096
I have the same problem with SClogin. The Login option redirect to the same page does not work anymore.
In the mean time I use the standard Joomla login, but I appreciate a quick solution for this problem, so I can re-use the SClogin module.

Please advise,

Regards,
Rob Prins
Last edit: 8 years 4 months ago by prin0096.
The topic has been locked.
Support Specialist
Rob - please try Alex's code change above in the thread to see if that resolves your issue.
The topic has been locked.
Active Subscriptions:

None
Hi Melissa,
I have already applied this patch. If i use another option than "Same Page" everything works fine. However the "Same page" option redirects to the user's profile page.
Please advise,

Kind regards,
Rob
The topic has been locked.
Active Subscriptions:

None
Hi All,
It seems that version 4.5.2. resolves my problem.
Thanks and regards,
Rob
The topic has been locked.