Bridging to Mediawiki

Started by Goss, August 11, 2015, 01:44:54 PM

Previous topic - Next topic

Goss

Hello! 

I'm running SMF 2.0.10 and MW 1.25.2 and trying to bridge the two.

I'm trying to use the bridge available here: https://github.com/SimpleMachines/smf-mw-auth

However, when I enable "$wgSMFLogin = true;" in local settings and am already logged in on SMF, I just get a blank page when I try to go to the wiki.  If I am not logged in, then the wiki loads fine.

This is what I have in my localsettings:

# This requires a user be logged into the wiki to make changes.
$wgGroupPermissions['*']['edit'] = false; // MediaWiki Setting

# If you experience the issue where you appear to be logged in
# eventhough you are logged out then disable the page cache.
#$wgEnableParserCache = false;
#$wgCachePages = false;

# SMF Authentication
# To get started you only need to configure wgSMFPath.
# The rest of the settings are optional for advanced features.

# Relative path to the forum directory from the wiki
# Do not put a trailing /
# Example: /public_html/forum and /public_html/wiki -> ../forum
$wgSMFPath = "../";

# Use SMF's login system to automatically log you in/out of the wiki
# This works best if you are using SMF database sessions (default).
# Make sure "Use database driven sessions" is checked in the
# SMF Admin -> Server Settings -> Feature Configuration section
# NOTE: Make sure to configure the $wgCookieDomain below
$wgSMFLogin = true;
$wgCookieDomain = 'sub.domain.com';

# Members in these SMF groups will not be allowed to sign into wiki.
# This is useful for denying access to wiki and a easy anti-spam
# method.  The group ID, which can be found in the url (;group=XXX)
# when viewing the group from the administrator control panel.
#$wgSMFDenyGroupID = array(4);

# Grant members of this SMF group(s) access to the wiki
# NOTE: The wgSMFDenyGroupID group supersedes this.
#wgSMFGroupID = array(1, 2, 9);

# Grant members of this SMF group(s) wiki sysop privileges
# NOTE: These members must be able to login to the wiki
#$wgSMFAdminGroupID = array(1, 2);

# SMF to wiki group translation.  This allows us to assign wiki groups
# to those in certain SMF groups.
#$wgSMFSpecialGroups = array(
#  // SMF Group ID => Wiki group name,
# 5 => 'autoconfirmed'
#);

# THIS MUST BE ADDED.  This prevents direct access to the Auth file.
define('SMF_IN_WIKI', true);

# Load up the extension
require_once "$IP/extensions/Auth_SMF.php";
$wgAuth = new Auth_SMF();


My forum and wiki are both currently on the same subdomain.

Forum: public_html/subdomain/
Wiki: public_html/subdomain/mw

Any ideas?


JBlaze

If you're getting a blank white page, that likely means you're getting a fatal error. Please check your server error logs and post the error(s) here.
Jason Clemons
Former Team Member 2009 - 2012

Goss

I enabled the display of php errors on mediawiki and this is the error I'm getting:

Fatal error: Cannot access protected property User::$mOptionOverrides in .../public_html/fracture/mw/extensions/Auth_SMF.php on line 876

Goss

Bump!  Still having this issue.  Any suggestions?

Goss

Any ideas?  I'd really love to be able to integrate my forum and wiki.

sagnitude

modify wiki's 'includes/User.php'

find 'protected $mOptionOverrides', change it to 'public $mOptionOverrides'

this shall fix it.

Advertisement: