• Resolved vtechteam

    (@vtechteam)


    I updated to woocommerce 8.0 this morning on 2 sites and received the same error on both sites.

    [09-Aug-2023 12:40:28 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query
    CREATE TABLE lesi_wc_orders (
    id bigint(20) unsigned,
    status varchar(20) null,
    currency varchar(10) null,
    type varchar(20) null,
    tax_amount decimal(26,8) null,
    total_amount decimal(26,8) null,
    customer_id bigint(20) unsigned null,
    billing_email varchar(320) null,
    date_created_gmt datetime null,
    date_updated_gmt datetime null,
    parent_order_id bigint(20) unsigned null,
    payment_method varchar(100) null,
    payment_method_title text null,
    transaction_id varchar(100) null,
    ip_address varchar(100) null,
    user_agent text null,
    customer_note text null,
    PRIMARY KEY (id),
    KEY status (status),
    KEY date_created (date_created_gmt),
    KEY customer_id_billing_email (customer_id, billing_email),
    KEY billing_email (billing_email),
    KEY type_status (type, status),
    KEY parent_order_id (parent_order_id),
    KEY date_updated (date_updated_gmt)
    ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Install::check_version, WC_Install::install, WC_Install::create_options, add_option, do_action('added_option'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\Features\FeaturesController->__call, call_user_func_array, Automattic\WooCommerce\Internal\Features\FeaturesController->process_added_option, Automattic\WooCommerce\Internal\Features\FeaturesController->process_updated_option, do_action('woocommerce_feature_enabled_changed'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController->__call, call_user_func_array, Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController->handle_data_sync_option_changed, Automattic\WooCommerce\Internal\DataStores\Orders\DataSynchronizer->create_database_tables, Automattic\WooCommerce\Internal\Utilities\DatabaseUtil->dbdelta, dbDelta
    [09-Aug-2023 12:40:28 UTC] WordPress database error Specified key was too long; max key length is 1000 bytes for query
    CREATE TABLE lesi_wc_orders_meta (
    id bigint(20) unsigned auto_increment primary key,
    order_id bigint(20) unsigned null,
    meta_key varchar(255),
    meta_value text null,
    KEY meta_key_value (meta_key, meta_value(100)),
    KEY order_id_meta_key_meta_value (order_id, meta_key, meta_value(100))
    ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci made by require_once('wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Install::check_version, WC_Install::install, WC_Install::create_options, add_option, do_action('added_option'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\Features\FeaturesController->__call, call_user_func_array, Automattic\WooCommerce\Internal\Features\FeaturesController->process_added_option, Automattic\WooCommerce\Internal\Features\FeaturesController->process_updated_option, do_action('woocommerce_feature_enabled_changed'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController->__call, call_user_func_array, Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController->handle_data_sync_option_changed, Automattic\WooCommerce\Internal\DataStores\Orders\DataSynchronizer->create_database_tables, Automattic\WooCommerce\Internal\Utilities\DatabaseUtil->dbdelta, dbDelta
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @vtechteam

    Since you recently made an upgrade, that error could be occurring due to a conflict with a malfunctioning plugin, script, or code that prevents your site from working correctly.

    One way to get to the root of the issue is performing a conflict test by temporarily switching your theme back to Storefront, disabling all plugins except WooCommerce, and checking if the error still appears. If that solves it, then re-enable all plugins one-by-one, until you find the one creating the conflict.

    You can find a more detailed explanation on how to do a conflict test here:?https://docs.woocommerce.com/document/how-to-test-for-conflicts

    If you’re not comfortable doing all of this on the live version of your site, you can create a staging environment using WP-STAGING.

    Let us know how it goes!

    Hi @vtechteam!

    In addition to @aguinaldodarla’s suggestion, could you please let us know if this issue appeared with the HPOS (High-Performance Storage Order) feature enabled or disabled?

    Thank you!

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Database issue after 8.0 update’ is closed to new replies.