TranslatePress Database issue (Collation)
-
Hi ?? I’m using TranslatePress on my website to translate English to French. Lately it’s struggling to properly show search results in the translated version of my site, and as I looked into updating and optimizing the database (hoping this would fix my search problem), I’ve run into an issue. It throws a database error due to the collation ‘utf8mb4_bin’ not being suitable for the character set ‘latin1’. I’ve looked at the database table it states, and the collation shown there is the latin1 (latin1_swedish_ci), not utf8mb4_bin. My WP-config also states latin1 as the database character set. I don’t known where the utf8mb4_bin comes from, and thus how I can change it to fix the error. My TranslatePress is at Version 2.8.1, WooCommerce 9.1.2, WordPress 6.6 (since this morning, but the error showed well before that). Any and all help is welcome!
Here’s the full error:
WordPress database error: [COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'latin1']
DELETEb
FROM wp_trp_gettext_fr_fr ASa
, wp_trp_gettext_fr_fr ASb
WHERE -- IMPORTANT: Ensures one version remainsa
.ID < 0 ANDb
.ID < 0 ANDa
.ID
<b
.ID
-- Check for all duplicates. Binary ensure case sensitive comparison AND (a
.original
COLLATE utf8mb4_bin =b
.original
ORa
.original
IS NULL ANDb
.original
IS NULL) AND (a
.translated
COLLATE utf8mb4_bin =b
.translated
ORa
.translated
IS NULL ANDb
.translated
IS NULL) AND (a
.status
=b
.status
ORa
.status
IS NULL ANDb
.status
IS NULL)AND (a
.domain
=b
.domain
ORa
.domain
IS NULL ANDb
.domain
IS NULL);
WordPress database error: [COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'latin1']
DELETEb
FROM wp_trp_gettext_fr_fr ASa
, wp_trp_gettext_fr_fr ASb
WHERE -- IMPORTANT: Ensures one version remainsa
.ID < 10000 ANDb
.ID < 10000 ANDa
.ID
<b
.ID
-- Check for all duplicates. Binary ensure case sensitive comparison AND (a
.original
COLLATE utf8mb4_bin =b
.original
ORa
.original
IS NULL ANDb
.original
IS NULL) AND (a
.translated
COLLATE utf8mb4_bin =b
.translated
ORa
.translated
IS NULL ANDb
.translated
IS NULL) AND (a
.status
=b
.status
ORa
.status
IS NULL ANDb
.status
IS NULL)AND (a
.domain
=b
.domain
ORa
.domain
IS NULL ANDb
.domain
IS NULL);
{"action":"trp_update_database","trp_updb_action":"remove_duplicate_gettext_rows","trp_updb_lang":"en_GB","trp_updb_batch":0,"trp_updb_nonce":"aa67654269","trp_update_completed":"no","progress_message":"
SQL Error:<\/strong> COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'latin1'<\/p>
Removing duplicated gettext strings for language fr_FR... done.<\/br><\/br>Removing duplicated gettext strings for language en_GB..."}
- You must be logged in to reply to this topic.