Page 1 of 1

Error message when submitting content page

Posted: Fri Nov 01, 2019 7:53 pm
by JamesT
I am getting this error message when submitting a content page with unicode characters.

Code: Select all

ERROR: Incorrect string value: '\xE2\x86\x90' for column `m_main`.`cms_module_search_index`.`word` at row 1
This "incorrect" string value is a unicode left arrow. Uninstalling the core Search module makes the error go away, but I wish to use search.

CMSMS is latest version. Any ideas?

Re: Error message when submitting content page

Posted: Fri Nov 01, 2019 8:29 pm
by DIGI3
I wasn't able to recreate this, so I'm going to guess it's unique to your configuration rather than a bug. Is everything in your setup set to be utf-8, or anything unusual in your config?

Does it make a difference if you're using a wysiwyg to add the content? Do all symbols do it or just this one?

If you can make it happen on a clean install, perhaps provide the exact steps for other people to recreate it.

Re: Error message when submitting content page

Posted: Fri Nov 01, 2019 8:36 pm
by JamesT
The server is setting utf-8 in the content header. Nothing unusual in my setup that I'm aware of.

I disabled WYSIWYG on the page and it still occurs.

It appears to be all unicode characters generating it. If I delete ← from the content, some Japanese symbols later in the page trigger the error. After I delete the last Unicode character, the error disappears.

Interestingly, despite the error, the changed content does submit ok, even though the user sees just a white page with the error message.

I'll try pasting the content into a fresh install.

Re: Error message when submitting content page

Posted: Fri Nov 01, 2019 8:52 pm
by JamesT
Pasting identical content into a clean install does not produce the error.

Any ideas on how I can fix my existing installation?

Re: Error message when submitting content page

Posted: Fri Nov 01, 2019 9:10 pm
by DIGI3
Probably need to start checking the database encoding and other things, see if you can find any difference between the site and the clean install.

Also perhaps check the config file to see if a default encoding is set (or try setting one): https://docs.cmsmadesimple.org/configur ... t_encoding

Other than that I'm not sure, but it's not anything I've had to deal with before. Someone else might have more insight.

Re: Error message when submitting content page

Posted: Fri Nov 01, 2019 9:34 pm
by JamesT
Some of the structure on my database (which was initialised many versions ago) was different to the fresh install.

I changed the table from InnoDB to MyISAM and created a new index, but I think what fixed it is switching the collation from latin1_swedish_ci to utf8_general_ci. Curious as to why I only saw an error now and not before.

Many thanks for setting me on the right path!