-
Notifications
You must be signed in to change notification settings - Fork 1
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
WordPress database error COLLATION utf8_general_ci
is not valid for CHARACTER SET utf8mb4
for query
#32
Comments
I couldn't reproduce this on a clean install. Adding the collate was once a fix for a problem: 593e4ff. Perhaps the collate differed per table and that caused problems? That may also be difficult to catch, but should we throw an exception for errors with this query? wp-pronamic-pay-mollie/src/Install.php Lines 392 to 399 in 6653500
|
I'm also unable to reproduce it. Probably better to not throw an exception then? |
I removed the collate clause, maybe the issue back in Mar 27, 2020 was related to: Currently i can't reproduce the following error:
By removing the Removing the exception might not be a good idea, the meta convert routine might be crucial for subscription websites. |
Just received a message about the same error occurring again:
Internal HelpScout ticket: https://secure.helpscout.net/conversation/2367890922/26189/ |
From what I understand, the issue is caused by the fact that the
Because the I found that if we want to ignore collations in this query, we can also use INNER JOIN
$wpdb->usermeta AS wp_user_meta
ON BINARY wp_user_meta.meta_value = mollie_customer.mollie_id I think that would be beneficial for this query, to prevent future collation issues. To modify the collation of the ALTER TABLE `wp_pronamic_pay_mollie_customers` MODIFY `mollie_id` VARCHAR(16) COLLATE 'utf8mb4_unicode_ci'; |
…ssues. See #32 (comment). Co-Authored-By: Reüel van der Steege <[email protected]>
Added in fd373d1. |
An user encountered the following error on plugin activation in a WordPress multisite:
This query is from the gateway install:
wp-pronamic-pay-mollie/src/Install.php
Lines 345 to 390 in 6653500
The collation in
$wpdb->collate
is determined in:However, I would expect it to result in something
utf8mb4
-ish there (utf8mb4_unicode_520_ci
in my non-multisite development environment)?According to site health, constants are set as follows:
DB_CHARSET
:utf8
DB_COLLATE
: undefinedIn this case, explicitly setting the
DB_COLLATE
constant resolved the issue:Internal Help Scout ticket: https://secure.helpscout.net/conversation/2258876225/25718
The text was updated successfully, but these errors were encountered: