Home arrow Forum Joomla-SMF 1.1.3 still redirects to forum, even if not selected
  Welcome, Guest. Please login or register.
Did you miss your activation email?
January 08, 2009, 02:29:14 AM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 1.1.x (Moderators: -Wolverine, kai920)
| | | |-+  Joomla-SMF 1.1.3 still redirects to forum, even if not selected
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Joomla-SMF 1.1.3 still redirects to forum, even if not selected  (Read 3332 times)
Bruce Nazarian
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 14


View Profile
Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« on: June 13, 2006, 01:06:20 PM »

running Joomla 1.0.5, SMF 1.1RC2, and J!-SMF Bridge 1.1.3, cannot get the login to STAY on the Joomla home page, even if no redirect is sclected in setup! Logins and logouts continue to route to the Forum home page, which is annoying!

thoughts? - Bruce
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #1 on: June 13, 2006, 01:17:09 PM »

which login module are you using?

Got a link to your site?
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Bruce Nazarian
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 14


View Profile
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #2 on: June 13, 2006, 03:42:31 PM »

oh Duh! Sorry - using com_login-acctexp,
which was hacked to allow use of com_acctexp 0.6.8, the newest one.
no big change, just points to com_acctxp instead of com_registration

site: http://www.recipe4dvd.com
you can use:
usr: sitevisitor
pwd: password

I'll kill it in a ittle while -
there's nothing of significance locked up yet anyway..
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #3 on: June 13, 2006, 10:12:50 PM »

The reason it does this is that that login module is missing a session variable we use in order to know that we are coming from a joomla login.  If you set $_SESSION['_FROM_MOS'] = true; in that login the redirect should take you back to joomla home.

If you need my help simply post the login module and I can make the change.

I will try to work the redirect a different way in the future so no modification of external logins are necessary.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Bruce Nazarian
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 14


View Profile
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #4 on: June 14, 2006, 01:26:04 AM »

Thanks Wolverine - I'll definitely post the module, as I'm still on the leaarning curve here, and modifying modules isn't on my radar for a whle, althouhg I do want to learn.

Thanks!

(A NOTE TO CLARIFY TO FORUM VISITORS HERE - DO NOT DOWNLOAD THE ATTACHED MODULE - IT WILL NOT HELP YOU USE J-SMF BRIDGE - IT WAS POSTED ONLY TO PROVIDE CODE FOR WOLVERINE TO INVESTIGATE)
« Last Edit: June 22, 2006, 12:39:01 AM by Bruce Nazarian » Logged
Gary Raduns
Joomla Newbie
*

Karma: +6/-0
Offline Offline

Posts: 36


View Profile
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #5 on: June 21, 2006, 02:59:35 PM »

This thing's giving me more trouble than it's worth. I think this is at least the third bug I've found, and these forums are so full of repeat problems from people not reading previous threads that I can hardly find anything. If I didn't need this for functionality, believe me, I wouldn't use it.

My login does the same thing as above, redirects to SMF. I have set the redirect off on login and selected the redirect to Joomla option on logout. The login module that I use is mod_login_userextended. It has a parameter to allow redirect on log-in/out, but setting it to the frontpage had no effect. I also tried adding the above code to the module, again with no effect.

Version info:
Mambo 4.5.4
SMF 1.1RC2
Joomla-SMF Bridge 1.1.3
Running Apache

Any help would be greatly appreciated.
« Last Edit: June 22, 2006, 10:25:10 AM by Gary Raduns » Logged
Gary Raduns
Joomla Newbie
*

Karma: +6/-0
Offline Offline

Posts: 36


View Profile
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #6 on: June 22, 2006, 10:23:57 AM »

As long as I have to keep fixing bugs, I'll keep posting fixes: After spending forever trying to fix this with settings, I finally decided to sit down and examine some of the code. I was able to fix the problem on logOUT, but the login problem is a bit more persistent. I developed this fix in Mambo 4.5.4, but it should work with any version of Mambo or Joomla.

The problem does NOT lie in the login module from what I have determined. It lies in the Mambo index.php patch. I had had previously patched it manually because the patch was designed for the Joomla index.php. The only downside to my fix, you'll have to edit the code manually. I could post an entire 4.5.4 index.php file upon request, but I am not attaching one at this time.

In the logout section of the code, the original patched version reads:

Code:
else if ($option == "logout") {
//JOOMLAHACKS.COM
//$mainframe->logout();


        mosRedirect( 'index.php?option=com_smf&action=logout;sesc='.$context['session_id'] );

        ...

Removing or commenting the mosRedirect statement fixed the redirect issue, but caused even more errors that I wasn't about to deal with, so I changed it back. I then uncommented the mainframe logout and found the doSMFlogout() function in functions.smf.php in the administrator component. Calling this funciton simply logs the user out of the SMF database. To log the user out of the fronted Mambo/Joomla uncomment the mainframe logout. At this point, the redirect is not needed to log the user out of SMF, so it can be removed. The fixed code:

Code:
else if ($option == "logout") {
//JOOMLAHACKS.COM
doSMFLogout();
$mainframe->logout();

        ...

The fixed code logs the user out of both sources, and by default redirects to index.php, the Mambo/Joomla frontpage.

I am still trying to correct the login issue. If I find a solution there I will post it here as well.

EDIT: I tried using the integrateLogin method from the bridge's functions, but I think there is something wrong with the SMF login portion of this method. The redirect was avoided with this method and the user logged into the site, but when I tried to access the forum, the login didn't transfer. I used this code to test:

Code:
if ($option == "login") {
//JOOMLAHACKS.COM
//$mainframe->login();
integrateLogin(_username, _password, -1);
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
$_SESSION['_FROM_MOS'] = true;
//doMamboSMF(true);
« Last Edit: June 22, 2006, 11:54:46 AM by Gary Raduns » Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #7 on: June 22, 2006, 12:00:55 PM »

the fix is forthcoming Gary.  On a side note, if you are interested in helping the bridge please send me a pm, I have more than enough work to do and help is appreciated.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Bruce Nazarian
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 14


View Profile
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #8 on: June 22, 2006, 12:50:50 PM »

The good news is that Gary's logout fix seems to work nicely  Cheesy

Now, just waiting on the Log IN fix...  Cry

Thanks for sharing, Gary - and the investigative work..
~ Bruce
Logged
Gary Raduns
Joomla Newbie
*

Karma: +6/-0
Offline Offline

Posts: 36


View Profile
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #9 on: June 22, 2006, 12:55:19 PM »

The last code snippet I posted above works for logging in to the frontend without a redirect. The only thing it won't do for you, Bruce, is log users into SMF. If you don't mind users having to log in to SMF a second time, you can start with that code until somoene comes up with something better.
Logged
Bruce Nazarian
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 14


View Profile
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #10 on: June 22, 2006, 05:42:22 PM »

well, Gary, we're halfway to a complete solution, and since I think the inconvenience of logging in a second time far outweighs the slight inconvenience of hitting the "home" menu, I'm going to leave the "logout" fix yu wrote in place,  and hold off until Wolverine (or someone else) finds the magic to fix the login.

thanks for your sleuthing! Someday I hope to know enough to reciprocate!

~ Bruce
Logged
ozgur
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


View Profile
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #11 on: June 25, 2006, 01:48:56 AM »

i tried gary's solve, it is usefull for directing problem but anymore any user can't be log out by clicking log out button??!
Logged
Gary Raduns
Joomla Newbie
*

Karma: +6/-0
Offline Offline

Posts: 36


View Profile
Re: Joomla-SMF 1.1.3 still redirects to forum, even if not selected
« Reply #12 on: June 25, 2006, 07:51:46 AM »

Which logout button are you using? It should definitely work for the Joomla login, and probably for the SMF as well, but if it doesn't work there I can check that out, too.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login