Error on wc_download_log table
-
We run a multisite with a cloner to create new sites. Woocommerce has been a part of that and no issues so far.
After the most recent update, we’re now getting the following error.
WordPress database error Can’t write; duplicate key in table ‘wp_44_wc_download_log’ for query CREATE TABLE IF NOT EXISTS wp_44_wc_download_log (
download_log_idbigint(20) unsigned NOT NULL AUTO_INCREMENT,
timestampdatetime NOT NULL,
permission_idbigint(20) unsigned NOT NULL,
user_idbigint(20) unsigned DEFAULT NULL,
user_ip_addressvarchar(100) COLLATE utf8mb4_unicode_520_ci DEFAULT ”,
PRIMARY KEY (download_log_id),
KEYpermission_id(permission_id),
KEYtimestamp(timestamp),
CONSTRAINTwp_2_wc_download_log_ibfk_1FOREIGN KEY (permission_id) REFERENCESwp_2_woocommerce_downloadable_product_permissions(permission_id) ON DELETE CASCADE
)When we create a new site we clone an existing site with network ID 2. The tables that are cloned are all empty. The database tables as you can see follow standard WP Multisite naming convention.
I’m not a database person, but this says it’s a duplicate key error. But the problem is wp_2_wc_download_log is empty! Of course wp_44_ did not exist before, and doesn’t exist after since it never gets created.
If the table we’re trying to clone is empty, how can we get a duplicate key error?
Advice on what could be causing this error? A similar error can be found here , not sure if they are related. https://ww.wp.xz.cn/support/topic/sql-error-on-update/
Let me know what other info I can provide. We also have WC Bookings instaled as well as WC Stripe
The topic ‘Error on wc_download_log table’ is closed to new replies.