module_templates prevents charset change

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
pgoneill

module_templates prevents charset change

Post by pgoneill »

I'm going through changing my database to utf8_general_ci.  Until I reached the table "module_templates".

Code: Select all

Error

SQL query:

ALTER TABLE `module_templates` CHANGE `module_name` `module_name` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
CHANGE `template_name` `template_name` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
CHANGE `content` `content` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL

MySQL said: Documentation
#1071 - Specified key was too long; max key length is 1000 bytes 
The problem is apparently due to module_name and template_name being indexes.  Is there a reason for that?

I changed my MySQL server to default to utf8.  Should I switch it back to latin1 (why it chooses latin1_swedish_ci is beyond me) so I can install CMSMS in the future?

EDIT: Interesting.  I have another install of CMSMS that's using utf8_general_ci for everything.  Works fine.  Any idea why I can't change this one?

EDIT2: Seems to be template_name causing the problem.  Here are the values:

calendar
default
default_display
detailDefault
displaydetails
displaylist
displayresult
displaysearch
displaysubmit
displaysummary
event
feusers_changesettingsform
feusers_forgotpasswordemailform
feusers_forgotpasswordform
feusers_forgotpasswordverifyform
feusers_loginform
feusers_logoutform
list
summaryBDCalls
summaryDefault
upcominglist
xnet

One of these is maxing out the 1000 byte index size limit.
Last edited by pgoneill on Wed Oct 03, 2007 9:06 pm, edited 1 time in total.
alby

Re: module_templates prevents charset change

Post by alby »

pgoneill wrote: I'm going through changing my database to utf8_general_ci.  Until I reached the table "module_templates".

Code: Select all

Error

MySQL said: Documentation
#1071 - Specified key was too long; max key length is 1000 bytes
The problem is apparently due to module_name and template_name being indexes.  Is there a reason for that?

........................

One of these is maxing out the 1000 byte index size limit.
Read this topic

Alby
pgoneill

Re: module_templates prevents charset change

Post by pgoneill »

OK, I changed the VARCHAR lengths to 150 and it seems to have worked.  Thanks - I didn't see that post when I searched for it. :(
Locked

Return to “CMSMS Core”