Issues with login / logout - Joomla 1.07 / SMF 1.06

Started by Pantheis, February 04, 2006, 09:37:14 PM

Previous topic - Next topic

Pantheis

I am having a serious login / logout issue with Joomla 1.07 and SMF 1.06.  I have the correct versions of the bridge modules installed, default install of the forums and Joomla, no core files modified.

I have published just the bridge login module on the front page.  When a user logs in from the front page, it goes directly to the forums even though I have the bridge login module set to return them to the front page of the site.  They also are not getting logged into the main site.  I can prove this by publishing both the bridge login module AND the joomla login module.  The bridge module will show them logged in with their forum Avatar, the joomla module will still be asking them to login.

This issue does not always happen however.  Sometimes I can get it to actually log me in and out correctly.  I will go away for 8 hours, return, go to login, and the issue will be back.  I found a thread that stated I might need to modify the sessioncookie code in MOS_SMF.php.  I have tried this and immediately after it seemed to be working, however I just went to login again and it's doing the same thing as before.

I have no idea why it isn't working correctly.

Bridge module: MOS_SMF_BRIDGEv3.19a_stable
Joomla: Joomla_1.0.7-Stable-Full_Package
SMF: smf_1-0-6_install
Followed the directions in MOS_SMF_BRIDGEv3.19a_stable to the letter during install.

I should note, and this MIGHT be why it's happening (but I can't really see why) that the SMF forums have imported data from PhpBB using phpbb2_to_smf.php, which seemed to complete successfully.

-edit-
I am also having an issue where posts that contain "i've, we've, we're" or anything with an ' in a word are being shown escaped, ie "I\'ve, we\'ve we\'re". 

url: www.dead-hand.org

Ideas?

Orstio

#1
QuoteI have published just the bridge login module on the front page.  When a user logs in from the front page, it goes directly to the forums even though I have the bridge login module set to return them to the front page of the site.

Your forum is unwrapped, so the redirect options do not work.

QuoteThey also are not getting logged into the main site.  I can prove this by publishing both the bridge login module AND the joomla login module.  The bridge module will show them logged in with their forum Avatar, the joomla module will still be asking them to login.

From Kindred's Combined Readme:

In MOS_SMF.php, we need to end the old Joomla session.  Because the name of the session cookie changed in Joomla, we need to change the code a bit:

Find (for login and logout functions...):



setcookie ("sessioncookie","",-3600, "/" );

Replace with:



    $sessionCookieName = md5( 'site'.$GLOBALS['mosConfig_live_site'] );
setcookie ($sessionCookieName,"",-3600, "/" );


There are two instances of this in MOS_SMF.php.


Quote-edit-
I am also having an issue where posts that contain "i've, we've, we're" or anything with an ' in a word are being shown escaped, ie "I\'ve, we\'ve we\'re". 

In your Joomla index.php, you can swap these two lines (~138-139):



$message = mosGetParam( $_POST, 'message', 0 );
if ($option == 'login') {


Altered code:


if ($option == 'login') {
     $message = mosGetParam( $_POST, 'message', 0 );


Please note that this will not fix posts retroactively.

Pantheis

#2
Quote from: Orstio on February 04, 2006, 09:51:23 PM
Your forum is unwrapped, so the redirect options do not work.

I have had this option work before, but it isn't consistant in working.  I do not want my forums wrapped but I do want people to be able to login from the main site and stay on the main site.  I do not understand why it works sometimes and doesn't work others.

I should mention that I just tried changing the forum to wrapped mode and the redirect options still do not work correctly.  No matter what I set they the forums come up in the wrapped window.

I have already changed the MOS file with the sessioncookie fix.  I can see people logging into the forums and the site now, but again, they still get directed right to the forums upon login, not to the main site.  I do not understand why this works some of the time and others it simply redirects to the forums.

-edit-
If I set the redirect options to redirect back to the page from where they logged in, it seems to redirect back to the main page (if that is the page they logged in from) when they login, even if the forums are in unwrapped mode.  Also, the fix you suggested for the escaped characters seems to work for all new posts, thank you.

Orstio

#3
The URL gets stored in the session from the login module.  If they happen to login from a page that does not display the login module, the redirect can't work because the information is not stored in the session.

Because of the instances where there may be no redirect information in the session, I wrote in a default redirect, which is back to the forum.  You can change that in MOS_SMF.php by finding this:

$returncheck = '1';

And changing it to this:

$returncheck = '0';

A value of 1 is to redirect to SMF, a value of 0 is to redirect to the Joomla frontpage.  Please note that this is a default value, in case the session has no redirect information.

Pantheis

This is exactly what I am looking for, thank you.

I plan on having the forums in wrapped mode in the future but cannot at the moment due to our site layout not being complete.  Thank you again everybody for all of your help!

Advertisement: