xoops forums

tvn3015

Just popping in
Posted on: 2008/9/8 4:00
tvn3015
tvn3015 (Show more)
Just popping in
Posts: 53
Since: 2007/4/18
#1

Is Mediawiki 1.71 working with Xoops 2.3 RC2?

I try to installed Mediawiki 1.71 on XOOPS 2.3 rc2 and got the following error:
Query "CREATE TABLE `xoops_mediawiki_categorylinks` ( cl_from int(8) unsigned NOT NULL default '0', cl_to varchar(255) binary NOT NULL default '', cl_sortkey varchar(86) binary NOT NULL default '', cl_timestamp timestamp NOT NULL, UNIQUE KEY cl_from(cl_from,cl_to), KEY cl_sortkey(cl_to,cl_sortkey), KEY cl_timestamp(cl_to,cl_timestamp) ) TYPE=InnoDB " failed with error code "Specified key was too long; max key length is 1000 bytes (sub.mywebsite.com)".


Have anyone actually got Mediawiki working with XOOPS 2.3 rc2 at all?
http://www.XoopsViet.com - Xoops for Vietnamese

ghia

Community Support Member
Posted on: 2008/9/8 7:13
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#2

Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

On MySQL 5.0.51a the query did run succesful.
The error message should not come, because the keys are all shorter than 1000 characters.

So, you are using UTF-8 as database character set encoding. This means that MySQL will reserve 3 bytes per character for accomodating the event that all characters in the key use a 3 byte encoding.
Therefore the cl_sortkey fails ((255+86) *3 > 1000).
Selecting an other character set for the XOOPS install may solve your problem (but seeing you are from Vietnam, this may not be an option).
Other possibility would be to shorten a little bit (8 bytes) the cl_to field, but I don't know the impact on the code for that.
You may notify the developer of this problem.

tvn3015

Just popping in
Posted on: 2008/9/8 17:29
tvn3015
tvn3015 (Show more)
Just popping in
Posts: 53
Since: 2007/4/18
#3

Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

Thank you for the reply!

Too bad! I thought it would save me alot of time if I using mediawiki (just like one here at xoops.org) so that I can just copy the xoopswiki contents and translated into Vietnamese for Xoopsviet wiki.

Please post if anyone know or have any idea to get arround this issue, would apreciated very much.
http://www.XoopsViet.com - Xoops for Vietnamese

ghia

Community Support Member
Posted on: 2008/9/9 18:57
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#4

Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

Which character set and collation are you using now for your website xoopsviet.com in MySQL?

tvn3015

Just popping in
Posted on: 2008/9/25 22:18
tvn3015
tvn3015 (Show more)
Just popping in
Posts: 53
Since: 2007/4/18
#5

Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

I am using utf8_unicode_ci.

I have posted the error message to my host provider and the come backe and saide
Quote:
As per the error message provided by you I can see that you are using storage engine "TYPE=InnoDB" which is not supported on our server. Please use storage engine as "TYPE= MyISAM" to resolve your issue.


How can I change storage engine to "TYPE= MyISAM"?

Thank you for all the reply

TVN
http://www.XoopsViet.com - Xoops for Vietnamese

ghia

Community Support Member
Posted on: 2008/9/26 20:27
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#6

Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

You must edit your sql file in the SQL directory for that.

Normally InnoDB is also by default present in the MySQL database services. It offers addtional features to MyISAM. I don't know if MediaWiki is using these features or if it will still be working after the change.

Because I believe your problem lies in the length of the key due to the UTF-8 encoding, it will surprise me if changing to MyISAM will solve your problem.
I would try this:
CREATE TABLE `xoops_mediawiki_categorylinks` (
 
cl_from int(8unsigned NOT NULL default '0',
 
cl_to varchar(255binary NOT NULL default '',
 
cl_sortkey varchar(86binary NOT NULL default '',
 
cl_timestamp timestamp NOT NULLUNIQUE KEY
 cl_from
(cl_from,cl_to), KEY
 cl_sortkey
(cl_to (240),cl_sortkey), KEY
 cl_timestamp
(cl_to,cl_timestamp)
 ) 
TYPE=InnoDB ;

sailjapan

Moderator
Posted on: 2009/3/11 13:48
sailjapan
sailjapan (Show more)
Moderator
Posts: 1672
Since: 2005/11/16
#7

Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

I'm in the same situation as tvn3015 was. Does anyone know if Ghia's hack worked, or another way to stop the 1000 character limit problem?
Never let a man who does not believe something can be done, talk to a man that is doing it.

sailjapan

Moderator
Posted on: 2009/3/14 22:43
sailjapan
sailjapan (Show more)
Moderator
Posts: 1672
Since: 2005/11/16
#8

Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

*soft bump*

So it would seem that I need a hack to get the wiki to work with UTF-8. Does anyone fancy a challenge? I wouldn't know where to start.

Seems like it would only be a question of increasing the size of a buffer or some such thing (as you can see, I'm no programmer) to allow creation of DB entry of more than 1000 bits...

Or something like that.

Anyone able to help?
Never let a man who does not believe something can be done, talk to a man that is doing it.

ghia

Community Support Member
Posted on: 2009/3/14 23:05
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#9

Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

Did you try the proposed modification for /sql/mysql.sql?

sailjapan

Moderator
Posted on: 2009/3/14 23:13
sailjapan
sailjapan (Show more)
Moderator
Posts: 1672
Since: 2005/11/16
#10

Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

To be honest, no. I didn't. I really have no idea about delving into sql tables...
any chance of a step-by-step for dummies?
Never let a man who does not believe something can be done, talk to a man that is doing it.