Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error:'utf8_unicode_ci' is not valid for CHARACTER SET 'utf8mb4' #3602

Closed
DaPoHou opened this issue Nov 21, 2020 · 2 comments
Closed

Error:'utf8_unicode_ci' is not valid for CHARACTER SET 'utf8mb4' #3602

DaPoHou opened this issue Nov 21, 2020 · 2 comments

Comments

@DaPoHou
Copy link
Contributor

DaPoHou commented Nov 21, 2020

I changed the database sorting rule from utf8_unicode_ci to utf8mb4_unicode_ci

MariaDB -10.4.17
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

Does not seem to work with utf8mb4.

Open Place list page:
SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8_unicode_ci' is not valid for CHARACTER SET 'utf8mb4' (SQL: select p_placefromwt_placeswherep_file= 2 andp_parent_id= 0 order by p_place /*! COLLATE utf8_unicode_ci */ asc) …/vendor/illuminate/database/Connection.php:664 #0 …/vendor/illuminate/database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback() #1 …/vendor/illuminate/database/Connection.php(333): Illuminate\Database\Connection->run() #2 …/vendor/illuminate/database/Query/Builder.php(2130): Illuminate\Database\Connection->select() #3 …/vendor/illuminate/database/Query/Builder.php(2324): Illuminate\Database\Query\Builder->runSelect() #4 …/vendor/illuminate/database/Query/Builder.php(2604): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}() #5 …/vendor/illuminate/database/Query/Builder.php(2326): Illuminate\Database\Query\Builder->onceWithColumns() #6 …/app/Place.php(193): Illuminate\Database\Query\Builder->pluck() #7 …/app/Module/PlaceHierarchyListModule.php(284): Fisharebest\Webtrees\Place->getChildPlaces() #8 …/app/Module/PlaceHierarchyListModule.php(219): Fisharebest\Webtrees\Module\PlaceHierarchyListModule->getHierarchy() #9 …/app/Http/Middleware/WrapHandler.php(66): Fisharebest\Webtrees\Module\PlaceHierarchyListModule->handle() #10 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\WrapHandler->process() #11 …/app/Http/Middleware/CheckCsrf.php(75): Middleland\Dispatcher->handle() #12 …/vendor/oscarotero/middleland/src/Dispatcher.php(136): Fisharebest\Webtrees\Http\Middleware\CheckCsrf->process() #13 …/vendor/oscarotero/middleland/src/Dispatcher.php(118): Middleland\Dispatcher->handle()
After Administrator Login, Website Log:
SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8_bin' is not valid for CHARACTER SET 'utf8mb4' (SQL: select n_surname /*! COLLATE utf8_bin */ AS surname, count(*) AS total from wt_namewheren_file= 2 and n_surn /*! COLLATE utf8_bin */ = 印 group bysurname) …/vendor/illuminate/database/Connection.php:664 #0 …/vendor/illuminate/database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback() #1 …/vendor/illuminate/database/Connection.php(333): Illuminate\Database\Connection->run() #2 …/vendor/illuminate/database/Query/Builder.php(2130): Illuminate\Database\Connection->select() #3 …/vendor/illuminate/database/Query/Builder.php(2324): Illuminate\Database\Query\Builder->runSelect() #4 …/vendor/illuminate/database/Query/Builder.php(2604): Illuminate\Database\

@fisharebest
Copy link
Owner

Does not seem to work with utf8mb4.

Correct. This issue is already known. See #2950

@DaPoHou
Copy link
Contributor Author

DaPoHou commented Nov 21, 2020

Mariadb is support utf8mb4_general_ci.
https://mariadb.com/kb/en/supported-character-sets-and-collations/
I backed up the database and re-imported it by changing the VARCHAR(255) in the SQL file to VARCHAR(191). Is it possible to support utf8mb4_general_ci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants