Advertisement
No auto login redirect to same page anymore?
- Soul Reaver
- Joomla! Apprentice
- Posts: 18
- Joined: Mon Mar 24, 2008 10:27 pm
- Location: Oz
Re: No auto login redirect to same page anymore?
Any updates on this as yet???
I thought i was losing my mind when upgraded to 1.5.9 and the login module redirects to home, but after reading this i can see it's an issue.
I agree with the majority here, when a user logs in via the login module they should be put back on the same page not home.
I thought i was losing my mind when upgraded to 1.5.9 and the login module redirects to home, but after reading this i can see it's an issue.
I agree with the majority here, when a user logs in via the login module they should be put back on the same page not home.
I'm new be gentle :O
Advertisement
- dextercowley
- Joomla! Virtuoso
- Posts: 3286
- Joined: Sun Apr 06, 2008 4:44 am
- Location: Seattle, WA, USA
Re: No auto login redirect to same page anymore?
Hi. We have a patch for this issue. We now need people to test it. Here is the link: http://joomlacode.org/gf/project/joomla ... m_id=15376. If we can get it successfully tested by two people, it can go into the next Joomla! release. Thanks! Mark
Mark Dexter
"Well...how did I get here?"
"Well...how did I get here?"
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: No auto login redirect to same page anymore?
Having some issues, Mark. Posting on joomlacode.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 29
- Joined: Thu Jul 24, 2008 2:20 am
Re: No auto login redirect to same page anymore?
Sorry, still a newbie....how did I install & test the .patch file?
I'd love to help move this along.
I also have DOCman installed and I'd like to make sure that it works with that as well too.
thanks to all for pushing forward with this. Really appreciated.
I'd love to help move this along.
I also have DOCman installed and I'd like to make sure that it works with that as well too.
thanks to all for pushing forward with this. Really appreciated.
- dextercowley
- Joomla! Virtuoso
- Posts: 3286
- Joined: Sun Apr 06, 2008 4:44 am
- Location: Seattle, WA, USA
Re: No auto login redirect to same page anymore?
Hi. Well, to install a patch you need to have a copy of Joomla! under Subversion source control. One way to do that is to use Eclipse with Subversion. It's a fair bit of setup, but worth it if you want to use an IDE for PHP/Joomla! development. Here is a link with detailed instructions: http://docs.joomla.org/Setting_up_your_ ... evelopment.
If you don't want to go through all of that, in this case it's pretty easy to manually make the change. The patch file looks like this:So this is telling you to go down to line 26 in the file modules/mod_login/helper.php and find the lines shown below that. Delete the line "$url = JURI::base(true);" and add in it's place the three lines with "+".
Hope this helps. Mark
If you don't want to go through all of that, in this case it's pretty easy to manually make the change. The patch file looks like this:
Code: Select all
Index: modules/mod_login/helper.php
===================================================================
--- modules/mod_login/helper.php (revision 11645)
+++ modules/mod_login/helper.php (working copy)
@@ -26,7 +26,9 @@
}
else
{
- $url = JURI::base(true);
+ // stay on the same page
+ $uri = JFactory::getURI();
+ $url = $uri->toString(array('path', 'query', 'fragment'));
}
return base64_encode($url);
Hope this helps. Mark
Mark Dexter
"Well...how did I get here?"
"Well...how did I get here?"
-
- Joomla! Apprentice
- Posts: 16
- Joined: Fri Jan 23, 2009 7:47 pm
Re: No auto login redirect to same page anymore?
I have applied the hack above to the latest version of Yoologin 1.5.9 and am hosting the fixed file on my server. It will keep users on whatever page they choose to login at. Just keep the redirection settings on:
- Select Item -
Simply Install via Joomla Backend! Enjoy!
http://www.metaltome.com/downloads/mod_ ... 9Fixed.zip
- Select Item -
Simply Install via Joomla Backend! Enjoy!
http://www.metaltome.com/downloads/mod_ ... 9Fixed.zip
-
- Joomla! Apprentice
- Posts: 29
- Joined: Thu Jul 24, 2008 2:20 am
Re: No auto login redirect to same page anymore?
I applied the patch (manually) as well and it seems to be working fine.
I'm on J! 1.5.9 with a LAMP set up.
This is on an internal company website so I can't share the link but I'll let you know if anything odd happens.
But so far so good.
Thanks A MILLION for doing this.
My users will be VERY happy.
I'm on J! 1.5.9 with a LAMP set up.
This is on an internal company website so I can't share the link but I'll let you know if anything odd happens.
But so far so good.
Thanks A MILLION for doing this.
My users will be VERY happy.
- Soul Reaver
- Joomla! Apprentice
- Posts: 18
- Joined: Mon Mar 24, 2008 10:27 pm
- Location: Oz
Re: No auto login redirect to same page anymore?
Above patch applied, working as expected. Thank you to all involved in this, hoping this is corrected in the next release.
I'm new be gentle :O
- dextercowley
- Joomla! Virtuoso
- Posts: 3286
- Joined: Sun Apr 06, 2008 4:44 am
- Location: Seattle, WA, USA
Re: No auto login redirect to same page anymore?
Hi. Yes, this issue is corrected in the SVN, which means that it will be included in version 1.5.10. Mark
Mark Dexter
"Well...how did I get here?"
"Well...how did I get here?"
-
- Joomla! Fledgling
- Posts: 3
- Joined: Tue Nov 06, 2007 3:48 am
Re: No auto login redirect to same page anymore?
Metaltome... YOO are da'MANNNN! Thanx from a grateful user! You're the guy that makes Joomla! the best CMS on the planet!!!metaltome wrote:I have applied the hack above to the latest version of Yoologin 1.5.9 and am hosting the fixed file on my server. It will keep users on whatever page they choose to login at. Just keep the redirection settings on:
- Select Item -
Simply Install via Joomla Backend! Enjoy!
http://www.metaltome.com/downloads/mod_ ... 9Fixed.zip
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Mar 26, 2009 3:32 am
Re: No auto login redirect to same page anymore?
Hi - I have tried changing the code as requested but I still get returned to the index page - and I have not selected any pages in the login module. Any ideas??
-
- Joomla! Apprentice
- Posts: 29
- Joined: Thu Jul 24, 2008 2:20 am
Re: No auto login redirect to same page anymore?
My only thought (simple as it may be) is that you didn't edit the code properly.
When I first did this (not having any experience with PHP) I added the code as displayed.
After re-reading and testing I found out that you need to delete that first line and then show the next 3 wthout the + sign.
Sounds stupid but that's what got me for a minute.
When I first did this (not having any experience with PHP) I added the code as displayed.
After re-reading and testing I found out that you need to delete that first line and then show the next 3 wthout the + sign.
Sounds stupid but that's what got me for a minute.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Mar 26, 2009 3:32 am
Re: No auto login redirect to same page anymore?
I did remove the + and -: see code below.
function getReturnURL($params, $type)
{
if($itemid = $params->get($type))
{
$menu =& JSite::getMenu();
$item = $menu->getItem($itemid);
$url = JRoute::_($item->link.'&Itemid='.$itemid, false);
}
else
{
// stay on the same page
$uri = JFactory::getURI();
$url = $uri->toString(array('path', 'query', 'fragment'));
}
return base64_encode($url);
}
function getReturnURL($params, $type)
{
if($itemid = $params->get($type))
{
$menu =& JSite::getMenu();
$item = $menu->getItem($itemid);
$url = JRoute::_($item->link.'&Itemid='.$itemid, false);
}
else
{
// stay on the same page
$uri = JFactory::getURI();
$url = $uri->toString(array('path', 'query', 'fragment'));
}
return base64_encode($url);
}
-
- Joomla! Apprentice
- Posts: 29
- Joined: Thu Jul 24, 2008 2:20 am
Re: No auto login redirect to same page anymore?
And you're sure the Login Module doesn't show a redirect page anymore, correct?
The fix for this is going to be in 1.5.10 and that's expected to be released some time this week.
I didn't have time now to review what you added but I might later today. If anyone else can help out please jump in.
The fix for this is going to be in 1.5.10 and that's expected to be released some time this week.
I didn't have time now to review what you added but I might later today. If anyone else can help out please jump in.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Mar 26, 2009 3:32 am
Re: No auto login redirect to same page anymore?
Ok - thanks for your help - but I have been a bit dumb - or I can blame my newbie status with Joomla - I needed to add the return url into a querystring that calls the login page as I am not using the login module but the login page. So I have got it working - by chaning teh url to:
/joomlamums/index.php?option=com_user&view=login&Itemid=69&return=<?php echo $returnurl; ?>
Thanks again for answering my questions!
S
/joomlamums/index.php?option=com_user&view=login&Itemid=69&return=<?php echo $returnurl; ?>
Thanks again for answering my questions!
S
- mlipscomb
- Joomla! Ace
- Posts: 1271
- Joined: Thu Mar 26, 2009 5:38 pm
- Location: Gadsden, AL
- Contact:
Re: No auto login redirect to same page anymore?
Thanks a lot of the mod.
If anyone needs to see it in action it is up and going at http://www.foodcreate.com
A quick side note - if you have this published and have already messed with a redirect, make sure you set it back to none - otherwise it will continue to redirect custom. I know most of y'all will automatically know that - but there are those that it can frustrate after way too many tries! :-)
If anyone needs to see it in action it is up and going at http://www.foodcreate.com
A quick side note - if you have this published and have already messed with a redirect, make sure you set it back to none - otherwise it will continue to redirect custom. I know most of y'all will automatically know that - but there are those that it can frustrate after way too many tries! :-)
~Matt Lipscomb
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
-
- Joomla! Apprentice
- Posts: 29
- Joined: Thu Jul 24, 2008 2:20 am
Re: No auto login redirect to same page anymore?
FYI - now that 1.5.10 is out there's no need for self patching the file. Just update Joomla! to the latest version and the login should work fine.
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Nov 19, 2007 9:00 pm
- Location: London
- Contact:
Re: No auto login redirect to same page anymore?
I've used this hack for the login MODULE and it works!. What about the COMPONENT? Will it work for that too?
- mlipscomb
- Joomla! Ace
- Posts: 1271
- Joined: Thu Mar 26, 2009 5:38 pm
- Location: Gadsden, AL
- Contact:
Re: No auto login redirect to same page anymore?
What component?
~Matt Lipscomb
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Nov 19, 2007 9:00 pm
- Location: London
- Contact:
Re: No auto login redirect to same page anymore?
By component I mean when say you have a restricted page and a user attempts to go to that page and a log in screen is called. This is not the same as the login module (although it looks the same). Or it's when you create a menu log in. This creates a component log in as opposed to a module log in. The hack above works for the module but not the component.
- mlipscomb
- Joomla! Ace
- Posts: 1271
- Joined: Thu Mar 26, 2009 5:38 pm
- Location: Gadsden, AL
- Contact:
Re: No auto login redirect to same page anymore?
if you upgrade to 1.5.10 it handles this.
~Matt Lipscomb
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
-
- Joomla! Apprentice
- Posts: 5
- Joined: Mon Mar 09, 2009 7:28 pm
Re: No auto login redirect to same page anymore?
No, 1.5.10 does not correct the problem for the login component, only the module. If you create a login menu item (User -> Login menu item type) or call up the com_user component's login view directly with an external link menu item, then attempt to login, you will not be redirected to the same page you came from (referrer page).
- mlipscomb
- Joomla! Ace
- Posts: 1271
- Joined: Thu Mar 26, 2009 5:38 pm
- Location: Gadsden, AL
- Contact:
Re: No auto login redirect to same page anymore?
Oh - I see what you're talking about. Instead it just stays on the login page or redirects to account details, right?
~Matt Lipscomb
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
-
- Joomla! Apprentice
- Posts: 5
- Joined: Mon Mar 09, 2009 7:28 pm
Re: No auto login redirect to same page anymore?
That's correct. It simply takes you to a redirect page that you can choose from your available menu items (if you arrive at the login view through a menu by clicking on a User->Login menu item type where you've configured the redirect settings) or to the index page (if you don't configure the redirect settings or you arrive at the login view through a menu item of type "External" which links to the index?option=com_user&view=login directly). This is very limiting because redirect to the page the user came from is a feature needed by a lot of people, and the login view of the component should have the same behavior as the module so there is flexibility in designing a site without a whole bunch of weird quirks...
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Nov 19, 2007 9:00 pm
- Location: London
- Contact:
Re: No auto login redirect to same page anymore?
Agree with Zoink on this but what is really needed is the ability to go to the restricted page (the page that you need to be logged in to see) once the log in has happened.
- mlipscomb
- Joomla! Ace
- Posts: 1271
- Joined: Thu Mar 26, 2009 5:38 pm
- Location: Gadsden, AL
- Contact:
Re: No auto login redirect to same page anymore?
I really think that having that be an "option" compared to automatic would be the best route since sometimes it's needed to go directly to the account page (especially if other advanced options for profile editing are used.)
Would anyone be interested in using a different component for the menu login link? That way for our needs you still have the option of directing users through the regular com_login or using the different component for previous page redirect.
Would anyone be interested in using a different component for the menu login link? That way for our needs you still have the option of directing users through the regular com_login or using the different component for previous page redirect.
~Matt Lipscomb
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
http://www.USAFreelancers.org
Professional Joomla! Services and Web Development based in the USA
-
- Joomla! Apprentice
- Posts: 5
- Joined: Mon Mar 09, 2009 7:28 pm
Re: No auto login redirect to same page anymore?
As long as it functioned the same as and possibly even just utilized the normal com_user component's login view, I would be interested. The only thing that's really needed is to find the redirect URL (current page), base64 encode it, and stick it onto the end of the query string of the link generated by the menu item.
Example:
index.php?option=com_user&view=login&return=qopa93jAkzjrhkjAEU
where return is the base64-encoded return URL
This could probably be done with a new component implementing this functionality and accessed through a new menu item type.
Also, it would be helpful to have the same for a logout menu item.
However, I'm not sure if it's possible to dynamically generate the link URL for a menu item on page load...
Example:
index.php?option=com_user&view=login&return=qopa93jAkzjrhkjAEU
where return is the base64-encoded return URL
This could probably be done with a new component implementing this functionality and accessed through a new menu item type.
Also, it would be helpful to have the same for a logout menu item.
However, I'm not sure if it's possible to dynamically generate the link URL for a menu item on page load...
- mcsmom
- Joomla! Exemplar
- Posts: 7897
- Joined: Thu Aug 18, 2005 8:43 pm
- Location: New York
- Contact:
Re: No auto login redirect to same page anymore?
If you click on a login link, the referrer page IS the login page. What you want is to go to the page before the referrer page. There has never been that feature, although it sure would be cool.
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Mon Mar 09, 2009 7:28 pm
Re: No auto login redirect to same page anymore?
Not the referrer to the post action, I was referring to the referrer of the login page request. Do you get my reference?
I refer you to my previous posts.
I refer you to my previous posts.
-
- Joomla! Apprentice
- Posts: 12
- Joined: Sun Mar 22, 2009 12:11 am
Re: No auto login redirect to same page anymore?
Hello all. Any new development on this issue? I just upgraded my site to 1.5.10 and still have the same problem: after you login in the Kunena discussion forum you are redirected to Home instead of the actual discussion forum.
Any new hack on this?
thanks
David
Any new hack on this?
thanks
David
Advertisement