Advertisement:

Author Topic: MediaWiki SMF Bridge not working - No auth, portal removed...  (Read 15257 times)

Offline Andre N

  • Jr. Member
  • **
  • Posts: 362
  • Gender: Male
  • My facebook friend tally has recently skyrocketed
    • R2bconcepts
Re: MediaWiki SMF Bridge not working - No auth, portal removed...
« Reply #20 on: March 15, 2012, 05:16:16 PM »
Try this out. Back up your other one first just in case
"Every generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?"

Offline ups

  • Semi-Newbie
  • *
  • Posts: 26
Re: MediaWiki SMF Bridge not working - No auth, portal removed...
« Reply #21 on: March 25, 2012, 05:50:37 PM »
I used this script and noticed a few quirks.

On my setup, it log in, but not with User data (it would just appear the IP). This was due two things:

I noticed that
Code: [Select]
$smf_member_id = $user->getOption('smf_member_id'); would always return 0 even if the Option was set to something else. This made the code to fail the authentication.
By checking the source, Mediawiki will return the option default value if the option is set to Hidden (as it is in this extension).

Also, even if everything checked out, the user data from mediawiki user would never be loaded. I added.

Code: [Select]
if ($user->getID() == 0)
{
...
}
else
{
$user->loadFromDatabase();
$user->saveToCache();
}

andre nickatina version seems a bit different and I might try it out.

Offline SleePy

  • Site Team
  • SMF Master
  • *
  • Posts: 28,959
  • Gender: Male
  • Thats his happy face.
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: MediaWiki SMF Bridge not working - No auth, portal removed...
« Reply #22 on: April 01, 2012, 03:26:18 PM »
I've updated the MediaWiki auth file.  The problem was I used $wgHiddenPrefs that apparently makes getOption always return 0 for the result.  I've removed those and the auth appears to work fine.

You can download the new one from the repo: https://github.com/SimpleMachines/smf-mw-auth
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub
G+

Offline Varsh

  • Newbie
  • *
  • Posts: 1
Re: MediaWiki SMF Bridge not working - No auth, portal removed...
« Reply #23 on: May 05, 2012, 02:26:03 PM »
So far I've been reading through all of this quite a lot and I still unfortunately can't get this to work. So far these are the steps I've done:
  • Installed SMF v2.0.2
  • Installed MediaWiki v1.19
  • Downloaded the latest Auth_SMF and uploaded it to the extensions directory
  • Edited the LocalSettings by adding the extra code at the end
  • Uncommented $wgSMFLogin and $wgCookieDomain and set the $wgSMFPath
  • Uploaded the file and MediaWiki works, the forums works, but whatever I do MediaWiki just cannot see me logged in at all
Any steps I've missed or need to change? If I comment out $wgSMFLogin and $wgCookieDomain then my password isn't recognised.

Edit: Nevermind I didn't see the attachment Andre Nickatina had in his post till I posted, it works a treat. Only thing I noticed is that initially I got an error on top of the Wiki for line 873 but a forced refresh sorted that out and got rid of it. Also noticed that the only way to logout is via the forums, either way I'm happy now that it works. :)
« Last Edit: May 06, 2012, 04:14:23 AM by Varsh »

Offline pftq

  • Jr. Member
  • **
  • Posts: 217
  • a pftq production!
    • < - - ( pq - a pftq production! ) - - - >
Re: MediaWiki SMF Bridge not working - No auth, portal removed...
« Reply #24 on: May 21, 2012, 04:04:02 PM »
Not sure what is different in the github version (1.14) but it wasn't letting mediawiki recognize I was logged into SMF.  Used the version Andre posted as well and it works fine here.

Edit: Tried the 1.14 version again and it's working fine now.  Just had a lot of logging in and out to get it working again.

Both versions seem to cause uncreated pages to throw 404 instead of the mediawiki message to create the page though.  Is anyone else getting this?
« Last Edit: May 21, 2012, 04:23:52 PM by pftq »

Offline arthorg

  • Newbie
  • *
  • Posts: 2
Re: MediaWiki SMF Bridge not working - No auth, portal removed...
« Reply #25 on: June 25, 2012, 10:33:08 PM »
Same as Varsh ans ptfq. The official repository version didn't work (SMF 2.0.2, MW 1.18), but the version posted by "Andre N" worked.