Extension talk:SMF Auth Integration

Is there a plan to update for 1.13? Or does anyone have solution for the error:

Notice: Undefined variable: result in ...wiki/includes/Title.php on line 1158

which occurs 5 times in a row when SMF_Auth is enabled?

Problems in 1.19
Many Users from my forum have this error. With my Account it works perfectly, I testet with a Account from a friend and became this error

Backtrace:
 * 1) 0 /homepages/7/d242867666/htdocs/wiki/includes/specials/SpecialUserlogin.php(440): User->setPassword('*******')
 * 2) 1 /homepages/7/d242867666/htdocs/wiki/includes/specials/SpecialUserlogin.php(709): LoginForm->initUser(Object(User), true)
 * 3) 2 /homepages/7/d242867666/htdocs/wiki/includes/specials/SpecialUserlogin.php(530): LoginForm->attemptAutoCreate(Object(User))
 * 4) 3 /homepages/7/d242867666/htdocs/wiki/includes/specials/SpecialUserlogin.php(716): LoginForm->authenticateUserData
 * 5) 4 /homepages/7/d242867666/htdocs/wiki/includes/specials/SpecialUserlogin.php(170): LoginForm->processLogin
 * 6) 5 /homepages/7/d242867666/htdocs/wiki/includes/SpecialPageFactory.php(476): LoginForm->execute(NULL)
 * 7) 6 /homepages/7/d242867666/htdocs/wiki/includes/Wiki.php(263): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
 * 8) 7 /homepages/7/d242867666/htdocs/wiki/includes/Wiki.php(593): MediaWiki->performRequest
 * 9) 8 /homepages/7/d242867666/htdocs/wiki/includes/Wiki.php(503): MediaWiki->main
 * 10) 9 /homepages/7/d242867666/htdocs/wiki/index.php(58): MediaWiki->run
 * 11) 10 {main}

Problems in 1.16

 * The bridge seems to be working fine for me, but changes to user preferences are not being saved with it active. Removing the bridge has them working fine again. Gossamer 15:41, 27 December 2010 (UTC)

Different SubDomains Integration
I have www.forum.maindomain.com SMF forum and www.wiki.maindomain.com MediaWiki what should i insert into $wgSMFPath =?

forum files stores in startfolder/subdomains/testforum/httpdocs/forum wiki files stores in startfolder/subdomains/wiki/httpdocs

when i write $wgSMFPath =../subdomains/testforum/httpdocs/forum wiki says that its wrong

If auth sharing is disabled, strange errors appear
I set the setting that users must relogin in the wiki, worked fine for admins but "normal" users wich are in the defined group can't login due to a strange error. I use the latest MediaWiki version (1.15.2).

Problems in 1.14
Note: I don't know yet if this is my fault or the software's. 
 * Using AutoAuthentication, logging in works fine, but on logging out, I'm being redirected to SMF which tells me
 * "An Error Has Occured: Session verification failed. Please try logging out and back in again, and then try again. "
 * Logging out in the SMF works.

Anyone having the same problems, or, better yet, a solution?


 * I've the same problem in 1.14 and also in 1.15.1! Please help me!!! --151.50.5.139 21:16, 3 August 2009 (UTC)

Solution
Change on the function UserLogoutSMF the line:

smf_redirectWrapper('logout_url', 'logout;sesc=' . $_SESSION['rand_code']);

To:

smf_redirectWrapper('logout_url', "logout;{$_SESSION['session_var']}={$_SESSION['session_value']}");

There is still the problem of the cookies, which must be deleted in order to skip autologin in the wiki.

Questions

 * If I comment out the part about, the whole extension seems to seize working. What is it meant to do in that case? I thought it would use the wiki login, but somehow hook into the SMF user table to see if there's a match (instead of using the wiki users), but this doesn't seem to be the case.
 * Using  or   doesn't seem to make a difference when not using  . When using it, only $wgHooks['UserLoadFromSession'][] works.

Problems in 1.12
Are you planning to update this for 1.12? Currently logging in and out doesnt function when $wgSMFLogin is enabled. The download link is broken.

Same Problem
get an Parse error: syntax error, unexpected '=' in /../../LocalSettings.php on line 153 where wgSMFLogin = true; is located

Problem still exists with version 1.13

Another bug
seems not work, it should be

like in Ver 1.12

Version 1.13.0 Hiccups
I was having some problems with the 1.13.0 beta in regards to this extension. I found out that the AutoAuthenticate hook doesn't exist anymore in 1.13+ and the suggestion is to use the UserLoadFromSession hook instead. I found that I was having login issues which may, or may not have been related. Now I'm not a serious coder but I did some tweaking of the Auth_SMF.php which are documented below and the issue seems to have been fixed though I am sure its couldn't have been as simple as that to fix.

Line 138: function AutoAuthenticateSMF(&$user) { Was changed into: function AutoAuthenticateSMF(&$user, &$result) {

Line 468: $wgHooks['AutoAuthenticate'][] = 'AutoAuthenticateSMF'; Was changed into: $wgHooks['UserLoadFromSession'][] = 'AutoAuthenticateSMF';

I would appreciate it if someone more knowledgeable would look the issue over and hopefully update the code. Cheers for the extension!

Works in 1.12
I just installed this extension to MediaWiki v1.12 and it is working great. Though I had a problem with logout. If I used the automatic wiki login/logout ($wgSMFLogin = true;), every browser just hanged when clicking the logout link (they kept requesting the same blank page over and over again). The problem was solved by modifying the Auth_SMF.php: Line 469: $wgHooks['UserLogout'][] = 'UserLogoutSMF'; Was changed into: $wgHooks['UserLogoutComplete'][] = 'UserLogoutSMF';

Underscore workaround suggestion
There are lots of characters besides underscore that are valid SMF usernames but invalid for the MediaWiki software. So, instead, why don't create a regexp that checks and removes these characters and, if at least one character has been removed, append the user's id, so we avoid any colission?

I will try to do it myself and put here the resulting code if anyone wants it.

MW1.17
Does anybody have this working for SMF 1.115 and MW1.17?

The MW links point to SMF logon, but it doesn't log the user into the wiki also...

Thanks 219.89.97.73

Error when changing line 468
to

it says: