• Welcome to Simple Machines Community Forum. Please login or sign up.
September 16, 2021, 06:28:32 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


SMF MediaWiki integration released

Started by SleePy, December 05, 2011, 11:40:48 PM

Previous topic - Next topic

Anthony`

January 08, 2012, 08:46:36 PM #20 Last Edit: January 08, 2012, 08:57:37 PM by Project Evolution
Quote from: SebaS on January 08, 2012, 08:25:46 PM
don't work :(

Deprecated:  Call-time pass-by-reference has been deprecated in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\wiki\extensions\Auth_SMF.php on line 265

i can't login in mediawiki. (the user don't exist)

Since the function requests a reference as the argument, it shouldnt even be necessary to have the $user object passed by reference right from the function call.
Code (Replace) Select
$wgAuth->isGroupAllowed($user_settings['member_name'], &$user);
Code (With) Select
$wgAuth->isGroupAllowed($user_settings['member_name'], $user);

This is for PHP 5.3.0+ users by the way.

SebaS

Quote from: Project Evolution on January 08, 2012, 08:46:36 PM
Quote from: SebaS on January 08, 2012, 08:25:46 PM
don't work :(

Deprecated:  Call-time pass-by-reference has been deprecated in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\wiki\extensions\Auth_SMF.php on line 265

i can't login in mediawiki. (the user don't exist)

Since the function requests a reference as the argument, it shouldnt even be necessary to have the $user object passed by reference right from the function call.
Code (Replace) Select
$wgAuth->isGroupAllowed($user_settings['member_name'], &$user);
Code (With) Select
$wgAuth->isGroupAllowed($user_settings['member_name'], $user);

This is for PHP 5.3.0+ users by the way.

the same error.

Anthony`

Quote from: SebaS on January 09, 2012, 07:45:50 PM
Quote from: Project Evolution on January 08, 2012, 08:46:36 PM
Quote from: SebaS on January 08, 2012, 08:25:46 PM
don't work :(

Deprecated:  Call-time pass-by-reference has been deprecated in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\wiki\extensions\Auth_SMF.php on line 265

i can't login in mediawiki. (the user don't exist)

Since the function requests a reference as the argument, it shouldnt even be necessary to have the $user object passed by reference right from the function call.
Code (Replace) Select
$wgAuth->isGroupAllowed($user_settings['member_name'], &$user);
Code (With) Select
$wgAuth->isGroupAllowed($user_settings['member_name'], $user);

This is for PHP 5.3.0+ users by the way.

the same error.

Are you sure you saved the file and applied the change correctly? Is it giving the same line in the error? You are using PHP 5.3.0 or higher correct?

SebaS

Quote from: Project Evolution on January 09, 2012, 07:48:44 PM
Quote from: SebaS on January 09, 2012, 07:45:50 PM
Quote from: Project Evolution on January 08, 2012, 08:46:36 PM
Quote from: SebaS on January 08, 2012, 08:25:46 PM
don't work :(

Deprecated:  Call-time pass-by-reference has been deprecated in C:\Program Files (x86)\EasyPHP-5.3.8.1\www\wiki\extensions\Auth_SMF.php on line 265

i can't login in mediawiki. (the user don't exist)

Since the function requests a reference as the argument, it shouldnt even be necessary to have the $user object passed by reference right from the function call.
Code (Replace) Select
$wgAuth->isGroupAllowed($user_settings['member_name'], &$user);
Code (With) Select
$wgAuth->isGroupAllowed($user_settings['member_name'], $user);

This is for PHP 5.3.0+ users by the way.

the same error.

Are you sure you saved the file and applied the change correctly? Is it giving the same line in the error? You are using PHP 5.3.0 or higher correct?

yes, the same line.

PHP 5.3.8
Apache 2.2.21
MySQL 5.5.16

Anthony`

Sorry, I have no idea what the problem is then.

danielwmoore

I've set up the LocalSettings.php per the instructions, removed the '&' from line 265 which fixed compatibility with my PHP 5.3.8, and the Wiki loads fine, however, I can't log in.  It redirects to an SMF login page, but I never get logged in.  I'm always a guest. 

I'm using MediaWiki 1.18.1 and SMF 2.0.2.

FireDitto

Okay, I've been staring at this bloody README for hte past hour, and I *STILL* can't figure out how to do this.

Can someone please please help?

What am I adding, to where? How am I configuring things?

I just... Maybe it's simple and easy and I'm an idiot.

But I seriously do not understand.
Second Pass Weyr
An AU Pernse RPG

SMF 2.0.6 with SP 2.3.5

Illori

you would be best to start a separate thread in the proper support board, this thread is not for support.

nyall

February 05, 2012, 11:21:42 AM #28 Last Edit: February 05, 2012, 12:27:37 PM by nyall
I'd like to contribute by expanding the README to include extra information that, for those like me far from being experts, may become useful. I am now figthing to make it work, and I can see I am not the only one, with no specific "central repository" for troubleshooting. Also there are a couple of mispellings. A FAQ section can be added to the bottom, or as a separate file.

I have submitted a pull request, hope you find it useful.

SleePy

February 05, 2012, 01:28:38 PM #29 Last Edit: February 05, 2012, 01:33:17 PM by SleePy
nyall,

I've looked and commented on your pull request.  I am sure most of it is confusion over the setup.  I am not the best one to write instructions on things and most of that was the original authors instructions.  Although the define does cause problems if the instructions where not read.

I am concerned about the first change suggested for problems though, that isn't the point of that code.  Something else is failing along the lines which is causing smf_member_id to not be retained in the wiki user options.  The code doesn't have the ability currently to correct bad smf_member_ids on accounts that exist.  Which may be why that coded failed if the SMF username was also Administrator and this is now conflicting with the wikis one.


It may be better to push off any long information into the readme and leave a big note at the top of the auth file to read the readme.


Thanks for the pull request though, I've been really busy lately with real life and haven't had any time to dig into the problems.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:GitHub
Join us on IRC Libera.chat/#smf

nyall

Nothing to worry, you're doing great work and we all know how life works  ;)  It's me who should thank you   :laugh:

Saw your replies, many thanks for your comments and corrections. Feel free to modify my suggested "patch", or even completely discard it. It serves for me, and I'd be happy if someone else can benefit from it. I can do the modifications based on your comments by myself and re-submit, if you prefer.

I have a separate issue for support with the workaround that I have implemented for the authentication issue. I have no idea why this may be happening, but again I'd be more than happy to be of any assistance to identify why this happens. My original thread can be found here:  http://www.simplemachines.org/community/index.php?topic=467594.0 

Now the bridge is working, but based on your comments I don't realize the implications of the workaround I have implemented. I'd be much obligued if you can give me a little explanation on that, either via PM, the support thread or here.

SleePy

I haven't tried it, but I wonder if you can make references to the pull request number to add to the issue.  Otherwise I will look into it later.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:GitHub
Join us on IRC Libera.chat/#smf

nyall

Quote from: SleePy on February 06, 2012, 01:04:40 AM
I haven't tried it, but I wonder if you can make references to the pull request number to add to the issue.  Otherwise I will look into it later.

Sorry, don't know if that's too technical or if it is due to English not being my mother tongue, but I am not sure what do you mean with "make references to the pull request number to add to the issue. "   :-[

SleePy

https://github.com/blog/831-issues-2-0-the-next-generation
http://stackoverflow.com/questions/1687262/link-to-github-issue-number-with-commit-message

Thats what I am referring to.  When you do that, any future commit notices are attached to that issue.  I don't know if it works on pull requests though.  If not oh well :)
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:GitHub
Join us on IRC Libera.chat/#smf

Illori

Quote from: Illori on January 30, 2012, 06:15:22 AM
you would be best to start a separate thread in the proper support board, this thread is not for support.

Masterd

Finally! I waited for this since this site's Wiki was released.

planet9

Today I've been trying to integrate MediaWiki, going through this thread to understand what is needed to make it work. And here I'm at the end of the thread with the impression that this integration does not yet work.

Does anyone have it working completely?  Is there a workable section for LocalSettings.php and Auth_SMF.php?

Thanks.

SleePy

There has been discussion at the github issue tracker page about some problems people have been having.
I've heard reports but haven't confirmed that it doesn't work with MW 1.18 (and thus most likely 1.19).
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:GitHub
Join us on IRC Libera.chat/#smf

planet9

My integration issue was a cookie problem.  The only problem I have now is that doing a wiki->login sends me to the forum after login and not back to the wiki.

As for the cookie issue there was nothing pointing me to this problem.  I didn't uncover it until I started outputting the cookie info.

Below is the cookie I was seeing:
a:3:{i:0;i:0;i:1;s:0:"";i:2;i:0;}

Auth_SMF.php unserializes it and there were no values in the variables id_member and password.

In order get a cookie like this:
a:4:{i:0;s:1:"1";i:1;s:40:"17f9832ca37464dc5ce25cffc408fefa1bfef908";i:2;i:1522519197;i:3;i:2;}

I had to turn off "Enable local storage of cookies".

These are my settings which work and integration works fine now:

SleePy

April 01, 2012, 03:28:55 PM #39 Last Edit: April 01, 2012, 03:34:53 PM by SleePy
As the note below that setting says, it doesn't work well with SSI.  What that setting does is fill out the path (ie /forum/) in the cookie so only that path can access the cookie.  By unchecking it, the cookie sets the path as /, which allows anything in that domain to work.  If you have subdomains you need to check the subdomains one.  That sets the wildcard (*) in the cookie for that domain.

I've updated the Auth file just now.  This one appears to work properly with MediaWiki 1.18


I'v also added your issue to the readmes FAQ section.  Hopefully that helps others in the future :)
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:GitHub
Join us on IRC Libera.chat/#smf

Advertisement: