No auto login redirect to same page anymore?

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
lipoftruth
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Sat Jun 20, 2009 11:04 am

Re: No auto login redirect to same page anymore?

Post by lipoftruth » Tue Aug 25, 2009 8:01 am

David0204 wrote:Hi lipoftruth

Thanks for the link to the instructions. Just to be absolutely sure: we are talking about overwriting the profilebox.php file with the patched version offered by @quila right?

David
It's a bit complicated as the patch from @quila is actually for both the "stay on same page" after login thing, and a new look for the profilebox.


From what I can see, as far as teh "stay on the same page" login thing, you have to put in THREE new files into their corresponding folers:

then there is a new files:
components / com_kunena / lib / kunena.login.php
components / com_kunena / template / default / plugin / login.php
components / com_kunena / template / default / plugin / redirect.php


And then you have to modify (or replace) the following file with the one provided by @quila:

components / com_kunena / template / default / post.php


That should work, as I think the other files were needed to change the LOOK of the profilebox. However, if you find that it doesn't work, you may have to go ahead and replace all the files that @quila mentioned.

Let us know how you go with that. As it would be good to have confirmation that it works for others as well (It's working for me, by the way).

klaxon_jackson
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Mar 13, 2009 6:33 pm

Re: No auto login redirect to same page anymore?

Post by klaxon_jackson » Wed Sep 16, 2009 1:11 am

has anyone got this working?

I am trying to set a secure content area for downloading whitepapers.

I can present the info to the user, and have got so that when they click download it asks them to register orloginn..

on successful login it reverts to homepage -- perhaps the worst usability functionaliity you can ever get - its bad enough having to make people log on as this drives peoiple away fom your site, but not having them return to the download page is plain criminal

I have tried all the code changes shown here and none of them work - has anyone got any ideas?

Thanks

jacko

talontedgirl
Joomla! Intern
Joomla! Intern
Posts: 58
Joined: Tue Mar 06, 2007 7:39 pm

Re: No auto login redirect to same page anymore?

Post by talontedgirl » Mon Oct 05, 2009 10:13 pm

I am also having issues.

Joomla 1.5.14
Yoo Login (or mod_login - both have the same issue)
Desired Login Page:
http://www.bigteazetoys.com/index.php?o ... Itemid=511
Username: user1
Password: test

1. This is the link that it is supposed to redirect to:
http://www.bigteazetoys.com/index.php?o ... Itemid=541

2. Even after logging in by the correct redirect url, it doesn't log me into that specific page. Instead I log in and see "Welcome to the registered user area of our site.", and thats it.
I do have that specific login page set in my module settings.
The logout redirect is working, just not the login redirect.

I've tried reading every single post, but didn't understand if there was a solution to this specific issue.

Any help would be greatly appreciated.

talontedgirl
Joomla! Intern
Joomla! Intern
Posts: 58
Joined: Tue Mar 06, 2007 7:39 pm

Re: No auto login redirect to same page anymore?

Post by talontedgirl » Wed Oct 07, 2009 3:23 pm

Does anyone have any suggestions as an alternative for having a Downloads section, for certain users to have access to, since my login redirect isnt working?

talontedgirl
Joomla! Intern
Joomla! Intern
Posts: 58
Joined: Tue Mar 06, 2007 7:39 pm

Re: No auto login redirect to same page anymore?

Post by talontedgirl » Thu Oct 08, 2009 4:52 pm

3 days and no responses, really?

I just re-read this whole topic, which was mostly based on J 1.5.10, but I am on 1.5.14 and my redirect will not work.
I do not want to stay on the same page after login.
The page that I specify doesn't come up when logging in.

I'm basically begging for help at this point as I need my art downloads section up.

XtremeX
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Fri Sep 23, 2005 3:05 pm

Re: No auto login redirect to same page anymore?

Post by XtremeX » Sat Oct 10, 2009 3:04 pm

I needed the same functionality so I slapped this plugin together.
A couple of points
  • This is to be considered alpha - I created this in about 20 minutes and have not tested outside my development environment (PHP5, Joomla 1.5.14)
  • I will endeavor to add additional features if required but the function of this plugin is simple.
  • I will attempt to fix any bugs that you encounter and add and features requested however I may not do so at a quick time frame - I am pretty busy and have a life aside from coding.
  • I recommend that this is not implemented straight into a production environment - test first
  • Whilst this is in alpha I suggest that people experienced with Joomla attempt this first, it works for me and if it breaks your site I will not fix it.
  • Lastly - enjoy. Joomla Redirecting to the home page is the most annoying feature of this great software I can think of.
  • Final Note: Thankyou to all the developers that made Joomla possible. Even with the little glitches like redirecting, Joomla is still the best CMS on the planet.
Download Here
http://www.softwaresolutions.com.au/sha ... 0.0.tar.gz

Your testing and help is appreciated.

SvenskaTabbar
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 119
Joined: Mon Nov 10, 2008 4:45 pm

Re: No auto login redirect to same page anymore?

Post by SvenskaTabbar » Sun Oct 18, 2009 8:39 pm

I installed it to try it out. Killed my site for a while ;)

There is a parser missing. Softwaresolutions parser or something like that.

User avatar
rajeshatbuzz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 198
Joined: Wed Sep 24, 2008 6:06 pm
Location: Bangalore
Contact:

Re: No auto login redirect to same page anymore?

Post by rajeshatbuzz » Mon Oct 19, 2009 9:18 am

Hi,

I can see that fix has been applied

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);
But when you use Login Page which is into mainframe, then its again redirecting to Home Page. Any Solution for this.

For example: when you installed any component which requires login to site and make use of resources. Then it uses Login page in body (Not Login Module). Si its redirecting to Home page instead of Same page.

Any Help on this?
cmsGalaxy Team, Web Developer, Bangalore, India
Website Design - Development - SEO - Joomla
www.cmsGalaxy.com

XtremeX
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Fri Sep 23, 2005 3:05 pm

Re: No auto login redirect to same page anymore?

Post by XtremeX » Thu Oct 29, 2009 6:32 am

SvenskaTabbar wrote:I installed it to try it out. Killed my site for a while ;)

There is a parser missing. Softwaresolutions parser or something like that.
I little tidbit left from my Env.
This has been fixed in the latest version
http://www.softwaresolutions.com.au/sha ... 0.2.tar.gz

j5th
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Jul 19, 2009 6:07 am

Re: No auto login redirect to same page anymore?

Post by j5th » Sun Nov 01, 2009 10:15 pm

Ugh.. still no fix? To clairfy my problem:

Login Module: works to redirect user to the same page
Login Component: redirects back to index

Correct me if I'm wrong, but shouldn't you be able to specify setting for BOTH the module and component? Seems ridiculous that they do not function as one.

widad
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Thu Nov 19, 2009 7:55 pm

Re: No auto login redirect to same page anymore?

Post by widad » Thu Nov 19, 2009 11:19 pm

Well, when i login, it redirects to the page i want. however, when i create an account for the first time (i've disabled email verification) it redirects to the home page with a message at the top saying you may now login. Can't it stay on the page it was on or redirect to a page i specify or bring them the login boxes as the main section of the page or even better, how bout just automatically logging them in? is there a way to do this already?

kwavewebdesign
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Dec 01, 2009 5:02 am

Re: No auto login redirect to same page anymore?

Post by kwavewebdesign » Wed Dec 02, 2009 4:13 am

Here is the much anticipated answer to login redirect problems

http://www.kunena.com/forum/144-hacks-t ... nena-login

follow the instructions. This will only work if you haven't made custom changes to Kunena files.

hope this helps took me 3 hours to find this answer

shivappa
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sat Nov 28, 2009 4:08 am

Re: No auto login redirect to same page anymore?

Post by shivappa » Fri Dec 04, 2009 1:42 pm

Hello guys,

I have problem regarding redirection

I have loged in once i login we have links like buypoints if user clicks links its redirecting to index page of defualt

shivappa
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sat Nov 28, 2009 4:08 am

Re: No auto login redirect to same page anymore?

Post by shivappa » Fri Dec 04, 2009 1:43 pm

Hello guys,

I have problem regarding redirection

I have loged in once i login we have links like buypoints if user clicks links its redirecting to index page of defualt instead of this its should redirect to paypal page where user need to enter details

lmt654
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Nov 29, 2008 10:08 pm

Re: No auto login redirect to same page anymore?

Post by lmt654 » Fri Dec 18, 2009 12:41 am

Hi,

I'm another one with login/logout redirect problems. I have login and logout in a menu, I have one template for 'home' page and another for the other pages. When I click on login it takes me to the login form, I fill out the user and password and click on login and it takes me back to the 'home' page. Same with logout, click on logout and it takes you to the 'home' page. The 'home' page is an intro page and not the best page to be redirected to at all. I am using Joomla 1.5.15, just upgraded from 1.5.14 had the same problem there.

A solution to this problem would be very much appreciated.

Cheers
Lene

str8talkingbob
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Dec 09, 2009 5:08 pm

Re: No auto login redirect to same page anymore?

Post by str8talkingbob » Tue Dec 22, 2009 7:19 pm

Hi, sorry if i'm been a bit dumb here but i've read all 4 pages of this topic and still am stuck for what to do, i have a menu item set up for login pointing to "index.php?option=com_user&view=login" i want people to return to the page from which they clicked the menu item after login, in the menu item parameters what do i put in the "login redirection url" section to have users go back to the page which they were on? Please please help i have been fighting with this for the best part of 2 days now :-[

spikesantee
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Dec 29, 2007 1:24 pm

Re: No auto login redirect to same page anymore?

Post by spikesantee » Sun Jan 03, 2010 11:53 am

Here is my description of the problem as http://www.spikesantee.com.

Joomla 1.5.15
Community Builder 1.2.1

I have a document with access level set to Registered. I have show unauthorized links on. When you arrive at the page http://www.spikesantee.com/Four-Keys you can see the intro to the articles and a Register to read more link after each one.

If you log in to my site by using the mod_cblogin in the left hand column, you'll stay right there on the page. But if you click on the Register to read more link after the intro text, you'll go to a similar looking log in form. When you log into that one, you are redirected back to the index.php page.

Something is wrong with that element of the Joomla that is called when you click on the Register to read more link. I'm not a programmer so I certainly don't pretend to know much more than what I just described but I can't figure where that log in form comes from and why I can't modify any parameters for it.

Thanks to everyone who is trying to solve this problem. :D

dixittejas
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri Dec 19, 2008 6:07 am

Re: No auto login redirect to same page anymore?

Post by dixittejas » Sat Jan 16, 2010 1:50 pm

Hi,

After taking this much of time, yet not getting anu solution for login component.
Now, any senior Joomla Expert have to do something for this issue, this issue became pain for many users.

Someone help us, It will be much appreciated.

Thanks,
Tejas

bobbo4775
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jan 21, 2010 6:10 pm

Re: No auto login redirect to same page anymore?

Post by bobbo4775 » Wed Jan 27, 2010 5:53 am

So has anyone figured out the redirection issue for the login component (I believe its com_user&view=login)? The module fix works perfectly for me but in pages that say "You must "login" first" it sends users to the login form and then that doesn't redirect back to the referring url.

jjj2
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Fri Feb 13, 2009 3:36 am

Re: No auto login redirect to same page anymore?

Post by jjj2 » Tue Feb 02, 2010 2:12 pm

Yes, I've having the same issue.

I have a few 'Registered' articles. When I click on them, it will prompt me to register or login. That's fine..

If I login through the mod_login, Joomla brings me to a page with Login/Logout Description... this is not acceptable & sounds stupid,
what it actually needs to be is to redirect to the 'Registered' article page.
But if I login using the com_user form, it'w working fine.

Anyone can help ?

User avatar
doctorj
Joomla! Intern
Joomla! Intern
Posts: 87
Joined: Sun Sep 04, 2005 4:42 am
Location: San Francisco, CA, USA
Contact:

Re: No auto login redirect to same page anymore?

Post by doctorj » Sat Feb 06, 2010 5:56 am

Has anyone found a fix for this? It makes me really consider switching back from Kunena to SMF.
Until Next Time,

Josh
http://www.gotgtek.net

lmt654
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Nov 29, 2008 10:08 pm

Re: No auto login redirect to same page anymore?

Post by lmt654 » Sat Feb 06, 2010 6:35 am

I have not seen a solutions to this issue yet. Still waiting .......and hoping.

Lene

User avatar
airton
Joomla! Ace
Joomla! Ace
Posts: 1368
Joined: Sun Nov 04, 2007 1:12 am
Location: Brazil
Contact:

Re: No auto login redirect to same page anymore?

Post by airton » Sat Feb 06, 2010 8:07 am

Hello guys,

I haven't been following this thread too closely and I haven't read all posts (there are too many), but I can see that many of you have this issue because you are using 3rd party extensions.

I ran a few tests using a clean J! install with sample data (J!1.5.15) and the steps and results follow:

- Edited the "Welcome to Joomla!" article in the "News" section, adding a read more link and setting it to registered;
- Edited the "The News" menu item to show unauthorized links;
- In front-end, I navigated to the "The News" menu item and clicked on the "Register to read more" link;
- After logging in, I was redirected to the full article view, as expected;
- Clicking on the "Logout" link in the User Menu and using the the "Logout" button in the logout page, brings me back to the main page or to the page I set the menu item to redirect to in the menu manager;
- If I use the login module I stay at the same page I was before logging in/out; unless I set login and/or logout redirection pages in the module parameters.
- Using the "Register to read more" link in a front page article will redirect back to the front page after logging in. That's a limitation in the framework, since being on the front page there is no menu itemid and the router doesn't know how to redirect to the full article view. I think this is not too much of a trouble, because in the front page it's easy to find the article the reader wants to see in full. I didn't test, but I think it will also happen if you navigate a page with no menu item for it (a link in another page, for example), because it will not have a menu itemid either. I think this behaviour can be corrected with a few changes in the read more plugin and also the user login code, but don't expect it for the J!1.5 series. I'm not sure it has been dealt with for J!1.6. Feel free to test and to propose the change (if it's not there yet), specially if you can provide a feature patch, before it goes beta.

So, Joomla! works correctly and consistently out of the box.

The problem is with 3rd party extensions that provide their own login/logout components/modules that are not correctly coded to work as you expect it to.

I think there is no sense in keeping searching for answers in this forum for something that is not Joomla core. IMHO, you should seek help with the extensions developers in their own forum(s).

Regards,
Airton Torres
Joomla Bug Squad http://groups.google.com/group/joomlabugsquad
Community website - http://community.joomla.org
Unsolicited support PMs will be deleted and the user added to the foes list.

str8talkingbob
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Dec 09, 2009 5:08 pm

Re: No auto login redirect to same page anymore?

Post by str8talkingbob » Sun Feb 07, 2010 8:43 pm

Fair point will test out without the several add ons

User avatar
rajeshatbuzz
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 198
Joined: Wed Sep 24, 2008 6:06 pm
Location: Bangalore
Contact:

Re: No auto login redirect to same page anymore?

Post by rajeshatbuzz » Wed Feb 17, 2010 11:36 am

I know this topics is discussed many places but could not find proper solution for this.Is there way to redirect same page after successful login?
cmsGalaxy Team, Web Developer, Bangalore, India
Website Design - Development - SEO - Joomla
www.cmsGalaxy.com

nttranbao
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Mar 08, 2010 8:54 am

Re: No auto login redirect to same page anymore?

Post by nttranbao » Mon Mar 08, 2010 8:56 am

rajeshatbuzz wrote:I know this topics is discussed many places but could not find proper solution for this.Is there way to redirect same page after successful login?
Wow, looks like Kunena redirect to current page after loggin in is a big issue. I googled and found other posts regarding this issue.

There are some workarounds, but all require lots of modification (some 5+ files or more), which is hard to trace.

So here is my workaround, for Kunena 1.5.9, Joomla 1.5.15:

Edit one file: ccmponents/com_kunena/template/default/plugin/profilebox/profilebox.php, and make it like below:

...

<?php // AFTER LOGIN AREA
if ($fbConfig->fb_profile == 'cb')
{
$loginlink = CKunenaCBProfile::getLoginURL();
$logoutlink = CKunenaCBProfile::getLogoutURL();
$registerlink = CKunenaCBProfile::getRegisterURL();
$lostpasslink = CKunenaCBProfile::getLostPasswordURL();
}
else if ($fbConfig->fb_profile == 'jomsocial')
{
$loginlink = JRoute::_('index.php?option=com_community&view=frontpage');
$logoutlink = JRoute::_('index.php?option=com_community&view=frontpage');
$registerlink = JRoute::_('index.php?option=com_community&view=register');
$lostpasslink = JRoute::_('index.php?option=com_community&view=frontpage');
}
else
{


$redirectUrl = $_SERVER['REQUEST_URI'];
$redirectUrl = base64_encode($redirectUrl);
$redirectUrl = '&return='.$redirectUrl;

//Start of modification
//nttranbao : add "&return=current-page" for Kunena to redirect to current page after log in

$loginlink = 'index.php?option=com_user&view=login' . $redirectUrl;
$logoutlink = 'index.php?option=com_user&view=login' . $redirectUrl;
$registerlink = 'index.php?option=com_user&view=register&Itemid=' . $Itemid . $redirectUrl;
$lostpasslink = 'index.php?option=com_user&view=reset&Itemid=' . $Itemid . $redirectUrl;


$loginlink = JRoute::_($loginlink);
$logoutlink = JRoute::_($logoutlink);
$registerlink = JRoute::_($registerlink);
$lostpasslink = JRoute::_($lostpasslink);


//Comment out/delete these 4 lines:
//$loginlink = JRoute::_('index.php?option=com_user&view=login');
//$logoutlink = JRoute::_('index.php?option=com_user&view=login');
//$registerlink = JRoute::_('index.php?option=com_user&view=register&Itemid=' . $Itemid);
//$lostpasslink = JRoute::_('index.php?option=com_user&view=reset&Itemid=' . $Itemid);
}

...

Save. And try for yourself: go to any page, then click login, enter credentials and bump, you are now at the previous page with logged on status.

PS: you can edit the above links to redirect to whereever you want, after login/logout/register or Lostpassword action

Enjoy

Bao Nguyen

Magnon
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Apr 27, 2010 5:14 am

Re: No auto login redirect to same page anymore?

Post by Magnon » Tue Apr 27, 2010 5:26 am

airton wrote:- Using the "Register to read more" link in a front page article will redirect back to the front page after logging in. That's a limitation in the framework, since being on the front page there is no menu itemid and the router doesn't know how to redirect to the full article view. I think this is not too much of a trouble, because in the front page it's easy to find the article the reader wants to see in full. I didn't test, but I think it will also happen if you navigate a page with no menu item for it (a link in another page, for example), because it will not have a menu itemid either. I think this behaviour can be corrected with a few changes in the read more plugin and also the user login code, but don't expect it for the J!1.5 series. I'm not sure it has been dealt with for J!1.6. Feel free to test and to propose the change (if it's not there yet), specially if you can provide a feature patch, before it goes beta.

So, Joomla! works correctly and consistently out of the box.
This "limitation in the framework" IS the problem...
And as far as I can see is NOT consistent...
(Depending on where you login from, you might or might not be redirected to the correct page after logging in)
and not a "with 3rd party extensions" as you suggest.

But thanks for explaining that this is a framework limitation, and hence the lack of an easy fix.

IMHO this is a Joomla core issue.

User avatar
mcsmom
Joomla! Exemplar
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?

Post by mcsmom » Wed Apr 28, 2010 2:13 am

$_SERVER['REQUEST_URI'] is xss vulernable

At minimum make it
htmlspecialchars($_SERVER['REQUEST_URI']);

http://www.php.net/manual/en/reserved.v ... server.php
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!.

bkmjoomla
Joomla! Intern
Joomla! Intern
Posts: 74
Joined: Sat May 17, 2008 10:10 pm

Re: No auto login redirect to same page anymore?

Post by bkmjoomla » Sun May 02, 2010 6:08 am

Magnon wrote:
airton wrote:- Using the "Register to read more" link in a front page article will redirect back to the front page after logging in. That's a limitation in the framework, since being on the front page there is no menu itemid and the router doesn't know how to redirect to the full article view. I think this is not too much of a trouble, because in the front page it's easy to find the article the reader wants to see in full. I didn't test, but I think it will also happen if you navigate a page with no menu item for it (a link in another page, for example), because it will not have a menu itemid either. I think this behaviour can be corrected with a few changes in the read more plugin and also the user login code, but don't expect it for the J!1.5 series. I'm not sure it has been dealt with for J!1.6. Feel free to test and to propose the change (if it's not there yet), specially if you can provide a feature patch, before it goes beta.

So, Joomla! works correctly and consistently out of the box.
This "limitation in the framework" IS the problem...
And as far as I can see is NOT consistent...
(Depending on where you login from, you might or might not be redirected to the correct page after logging in)
and not a "with 3rd party extensions" as you suggest.

But thanks for explaining that this is a framework limitation, and hence the lack of an easy fix.

IMHO this is a Joomla core issue.
I was under the impression since I am still learning Joomla that I just did not understand the login workflow. But now after reading the first and fourth pages of this thread it appears the "randomness" I was observing when logging in and out is due to a much deeper issue.

I was hoping to find an answer to the "stay on the same page" problem, but it appears there is not a solution using Joomla alone. Can anyone recommend any login extensions that will address this problem? I need to bury this issue and move on to other site challenges.

Thanks in advance for the help.

fsoica
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Oct 04, 2005 1:32 pm

Re: No auto login redirect to same page anymore?

Post by fsoica » Sun May 16, 2010 8:39 am

is not possible to somehow tweak a plugin like "Group redirect" to do exactly what we want ?

http://extensions.joomla.org/extensions ... ment/10225

I installed group redirect and it effectively "steals" all login events (module or component) and redirects users to the STATIC pages specified in the plugin config.

If a good coder could somehow modify those hand-put adresses for redirect with the previous page URL, it would be exactly what everyone here needs. something along those lines has been attempted by the Software Solutions' plugin author (a few posts above - http://www.softwaresolutions.com.au/sha ... 0.2.tar.gz) , but with no effect, at least on my website.


Locked

Return to “Joomla! 1.5 Bug Reporting”