Page 4 of 5

Re: No auto login redirect to same page anymore?

Posted: Tue Aug 25, 2009 8:01 am
by lipoftruth
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).

Re: No auto login redirect to same page anymore?

Posted: Wed Sep 16, 2009 1:11 am
by klaxon_jackson
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

Re: No auto login redirect to same page anymore?

Posted: Mon Oct 05, 2009 10:13 pm
by talontedgirl
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.

Re: No auto login redirect to same page anymore?

Posted: Wed Oct 07, 2009 3:23 pm
by talontedgirl
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?

Re: No auto login redirect to same page anymore?

Posted: Thu Oct 08, 2009 4:52 pm
by talontedgirl
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.

Re: No auto login redirect to same page anymore?

Posted: Sat Oct 10, 2009 3:04 pm
by XtremeX
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.

Re: No auto login redirect to same page anymore?

Posted: Sun Oct 18, 2009 8:39 pm
by SvenskaTabbar
I installed it to try it out. Killed my site for a while ;)

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

Re: No auto login redirect to same page anymore?

Posted: Mon Oct 19, 2009 9:18 am
by rajeshatbuzz
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?

Re: No auto login redirect to same page anymore?

Posted: Thu Oct 29, 2009 6:32 am
by XtremeX
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

Re: No auto login redirect to same page anymore?

Posted: Sun Nov 01, 2009 10:15 pm
by j5th
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.

Re: No auto login redirect to same page anymore?

Posted: Thu Nov 19, 2009 11:19 pm
by widad
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?

Re: No auto login redirect to same page anymore?

Posted: Wed Dec 02, 2009 4:13 am
by kwavewebdesign
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

Re: No auto login redirect to same page anymore?

Posted: Fri Dec 04, 2009 1:42 pm
by shivappa
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

Re: No auto login redirect to same page anymore?

Posted: Fri Dec 04, 2009 1:43 pm
by shivappa
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

Re: No auto login redirect to same page anymore?

Posted: Fri Dec 18, 2009 12:41 am
by lmt654
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

Re: No auto login redirect to same page anymore?

Posted: Tue Dec 22, 2009 7:19 pm
by str8talkingbob
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 :-[

Re: No auto login redirect to same page anymore?

Posted: Sun Jan 03, 2010 11:53 am
by spikesantee
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

Re: No auto login redirect to same page anymore?

Posted: Sat Jan 16, 2010 1:50 pm
by dixittejas
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

Re: No auto login redirect to same page anymore?

Posted: Wed Jan 27, 2010 5:53 am
by bobbo4775
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.

Re: No auto login redirect to same page anymore?

Posted: Tue Feb 02, 2010 2:12 pm
by jjj2
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 ?

Re: No auto login redirect to same page anymore?

Posted: Sat Feb 06, 2010 5:56 am
by doctorj
Has anyone found a fix for this? It makes me really consider switching back from Kunena to SMF.

Re: No auto login redirect to same page anymore?

Posted: Sat Feb 06, 2010 6:35 am
by lmt654
I have not seen a solutions to this issue yet. Still waiting .......and hoping.

Lene

Re: No auto login redirect to same page anymore?

Posted: Sat Feb 06, 2010 8:07 am
by airton
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,

Re: No auto login redirect to same page anymore?

Posted: Sun Feb 07, 2010 8:43 pm
by str8talkingbob
Fair point will test out without the several add ons

Re: No auto login redirect to same page anymore?

Posted: Wed Feb 17, 2010 11:36 am
by rajeshatbuzz
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?

Re: No auto login redirect to same page anymore?

Posted: Mon Mar 08, 2010 8:56 am
by nttranbao
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

Re: No auto login redirect to same page anymore?

Posted: Tue Apr 27, 2010 5:26 am
by Magnon
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.

Re: No auto login redirect to same page anymore?

Posted: Wed Apr 28, 2010 2:13 am
by mcsmom
$_SERVER['REQUEST_URI'] is xss vulernable

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

http://www.php.net/manual/en/reserved.v ... server.php

Re: No auto login redirect to same page anymore?

Posted: Sun May 02, 2010 6:08 am
by bkmjoomla
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.

Re: No auto login redirect to same page anymore?

Posted: Sun May 16, 2010 8:39 am
by fsoica
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.