Jump to content

Error when adding new page with non-ascii characters in a page field


Gideon So
 Share

Recommended Posts

I create a page reference field that allows user to create new page in the page edit page. I got this error:

Error adding page "一二三" - SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

 think it worked fine before I upgraded to 3.0.115.

Any idea?

Gideon

Link to comment
Share on other sites

Hi,

I think this is a bug in the Page Reference field  which was introduced after core version 3.0.106. I tested it with both multi-language and single language setting. Both of them give the same error when trying to create a page with non ASCII page name in the page edit page. Should I report this to the github bug issue?

Gideon

Link to comment
Share on other sites

  • 2 weeks later...

I've added a few details about the cause of the expection to the issue. In short, the pages.name table is created with an ascii charset by the installer, which should probably be changed.

As a workaround, after installation, execute the following statement:

ALTER TABLE pages MODIFY COLUMN `name` varchar(128) character set utf8 NOT NULL;

(Change utf8 to utf8mb4 if you selected that character set in the installer)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...