table charset issue (mysql_upgradeTableToUTF8mb4()) for CMSB upgrade to 3.15

3 posts by 3 authors in: Forums > CMS Builder
Last Post: December 27, 2018   (RSS)

Hi, All.

Just sharing an error I encountered upgrading from 3.13 to 3.15.

I received a similar error set for three (not all) of the tables in the install.

----------------------------

MySQL Error: Specified key was too long; max key length is 1000 bytes. MySQL Query:
ALTER TABLE `cms_articles` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
MODIFY `title` varchar(255) CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' ,
MODIFY `author` varchar(255) CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' ,
MODIFY `content` mediumtext CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' ,
MODIFY `external_website_url` mediumtext CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' ,
MODIFY `external_website_name` mediumtext CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' 

TIP: Add &deferCharsetUpgrade=1 to URL to temporarily skip this upgrade and then remove and re-add any indexes in the field editor for the fields listed above.

- in mysql_functions.php on line 397 by __mysql_upgradeTableToUTF8mb4()
/home/zzzweb/public_html/cmszzz/lib/common.php (line 1280)

----------------------------

There were a couple of similar posts prior to version 3.15, but it seems the field editor fix in 3.15 would have taken care of this. I'm guessing this error tripped because MySQL Indexing was set to 'Create column index' for a couple of the fields in each of the tables.

I wasn't clear on the "Tip" instructions, so I manually updated the column types in the database to utf8mb4_unicode for the three tables and all seems well. I'll do the same if this happens again, but wanted to post this for others.

~ Deborah

Thanks, Deborah.

Best for the holidays

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php