anyone want to test my new MediaWiki user bridge?
#21
is the mediawiki install new? it should be a latin collation by default I believe. you may need to ask the mediawiki folks what happened.
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#22
Yes, this is a new wiki installation and I haven't customized it in any way.
I reinstalled wiki, using correct default collation, problem still existed.

My friend helped me to find where error starts - problem is that while creating cookie mybb takes utf8 username 'Džira' and replaces that with aschii one (D%9Eira). So I don't know how to fix this problem but the problem is not with bridge.
Reply
#23
i will have to dig through the MyBB code to see how it is handling usernames in the cookies it saves. i would need to apply the same logic to the bridge when it reads the cookie.
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#24
We took one more look to cookie and it was not mybb cookie, it was wiki cookie (so cookie was innocent victim)

And we found the error. In mybb bridge file after:
function connect($settings)
	{
		// Connect to database.
		$this->conn = @mysql_connect($settings['db_server'], $settings['db_user'],
	 		$settings['db_pass'], true);
you need to add the line:
			
	    mysql_query("SET NAMES binary;");

I'll test this some more but it seems to work correctly now. Smile
Reply
#25
strange, that has not come up before. Please test some more and report back. I have not seen it on some of the other bridges I have seen either. Good catch
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#26
As far as we tested all usernames were saved correctly and no errors appeared. Everything seems to work fine.

As my friend explained - this line sets charset for connection. If it's not set then default charset for connection (defined in mysql server) is used.

As wiki used binary charset for connection (we saw it in wiki logs) but mysql predefined connection charset was different (latin_1 maybe) then setting right charset for connection fixed error.

I don't know if it's special case or other unicode users might meet the same error. Smile
Reply
#27
This error writing in error log 9800 times. How i fix that?

[Thu Feb 05 08:45:06 2015] [error] [client 224.0.0.0] PHP Strict Standards:  Declaration of Auth_MyBB::modifyUITemplate() should be compatible with AuthPlugin::modifyUITemplate(&$template, &$type) in /home/game/public_html/site.com/viki/Auth_MyBB.php on line 248

(2013-12-08, 11:26 AM)RavenDust Wrote: That would be the latest, 1.22.0. The board is running on 1.6.11.

btw, adding &$type to the function declaration seems to fix it^^

How to fix that problem? I have same problem. Please help.
Reply
#28
find in Auth_MyBB.php

function modifyUITemplate( &$template ) {

and change it to

function modifyUITemplate( &$template, &$type) {
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#29
(2015-02-05, 06:36 PM)pavemen Wrote: find  in Auth_MyBB.php


function modifyUITemplate( &$template ) {

and change it to


function modifyUITemplate( &$template, &$type) {
Thank you.  Smile
Reply
#30
Will this work for 1.8 by any chance?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)