Closed berianwilliams closed 4 years ago
Load the extension after you define the variables. Not missing anything I guess, but I should make that more obvious, I think. >_>
Also be careful of assigning the bureaucrat group, unless you really seriously need to. Most of what it does is going to get clobbered by the extension.
I've tried it before and after the variable definitions, but it didn't make any visible difference. I also tried emptying out of bureaucrat array.
I've attached my LocalSettings.php (with all secret data removed), could you please look and see if I'm doing something dumb?
Set $wgDebugLogFile to a path you have write access to, preferably in a private directory.
For example:
$wgDebugLogFile = "../../logs/mediawiki.log";
Grep it for ForumSessionProvider lines.
This bloats pretty quickly, but it should tell you what is wrong, though I have a couple bugs and omissions in it. I'll patch this up in the 1.1 branch shortly.
Oh right.
If you have upgraded to SMF 2.0.16, you will need to use the 1.1 branch - SMF 2.0.16 changes how cookies are validated.
I've polished things there, regardless.
See #2
I'm now running version 1.1, and tried it with debug on. Somehow I'm seeing no logs for ForumSessionProvider though! Special:Version does show version 1.1.0 of ForumSessionProvider though, so no idea what's happening...
Whoops, see my latest commit.
Missed that you were already logging in your LocalSettings. Are you sure it's logging there though? It ought to have caught that...
@berianwilliams is your issue resolved?
Still nothing, I'm afraid.
I've tried installing the latest 1.1 branch changes from today (I'm running SMF 2.0.16), and set there to be only one $wgDebugLogFile entry. There are still no ForumSessionProvider entries in the log though!
Okay, for some reason the LoggerFactory instance isn't doing its thing inside of provideSessionInfo.
Fixed in latest commit.
Set
$wgFSPDebug = true;
It will definitely send ForumSessionProvider entries throughout the login process now. If you see 'Access Granted!' and still aren't logged in, something is terribly wrong.
I now get:
[ForumSessionProvider] Constructor initialized, debug log enabled.
[ForumSessionProvider] Loading Settings.php...
[ForumSessionProvider] User detected, attempting to load database...
[ForumSessionProvider] Database loaded, attempting to load forum member...
[ForumSessionProvider] Forum member found, verifying cookie...
[ForumSessionProvider] Member ID 39 failed to validate. Remote IP:82.9.110.127
I definitely am logged in as user 39 though; the wiki still shows the 'log in' link, and if I click that the forum login page opens with the header showing me logged in as said user. Further up in the log I see a list of cookies, and the forum cookie is one of them.
Just in case it makes a difference, I'm running MediaWiki version 1.31.1, SMF version 2.0.16.
@berianwilliams see latest commit. Should work now. No small embarrassment on my part. >_>
Works now! Thanks very much for the help, it's a very useful tool to have!
Hi. I've unzipped the folder ForumSessionProvider into my extensions folder.
I've added the below lines to LocalSettings.php:
But when I open the wiki, following the 'log in' link then logging in doesn't seem to have any effect. Any advice?