• studiolautrec

    (@studiolautrec)


    Hi, I have many errors in the logs: WordPress database error Too many keys specified; max 64 keys allowed for query ALTER TABLE wp_yith_wcwl_lists CHANGE COLUMN wishlist_token wishlist_token VARCHAR( 64 ) NOT NULL UNIQUE made by require_once(‘wp-admin/admin.php’), require_once(‘wp-load.php’), require_once(‘/files/web/wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, YITH_WCWL_Admin->install, YITH_WCWL_Install->init, YITH_WCWL_Install->add_tables, YITH_WCWL_Install->add_wishlists_table, dbDelta
    By removing ‘wishlist_token’ indexes in the table ‘wp_yith_wcwl_lists’ there are no more errors for a while, but as the plugin continues to recreate indexes named ”wishlist_token”, the error reappears when there are 64 indexes.
    I have disabled/reactivated the plugin, uninstalled/reinstalled, without success. The version used is 3.8, I cannot update to 4.x for now because it breaks the layout.
    Thanks in advance for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    thanks for contacting us!

    I recommend you perform the following tests to see if the problem disappears at some point:

    • update the plugin, WC and WP to the latest version.
    • change to a default WP theme like 2024.
    • leave only WC and our plugin active, and activate your plugins in batches until you find the one that is in conflict.

    Could you check it, please?

    Best regards.

    Thread Starter studiolautrec

    (@studiolautrec)

    Thank you for your answer.

    Here are the details of the bug that occurs in the yith-woocommerce-wishlist/includes/class-yith-wcwl-install.php file

    The is_installed() method is called to check if the yith_wcwl tables are already created.

    Except for the code ''SHOW TABLES LIKE %s', "{$this->table_items}%"' returns 3, because I have 3 tables containing the string “yith_wcwl”: wp_yith_wcwl, wp_yith_wcwl_itemmeta and wp_yith_wcwl_lists.

    And is_installed() checks the following condition (bool) ( 2 === (int) $number_of_tables ); and therefore returns false in this specific case since 3 != 2, which causes the plugin to want to reinstall the tables each time.

    I don’t know if it’s normal or not that I have these 3 tables? Maybe it’s a really special case, however the code of is_installed() should be more precise than just using ‘LIKE %s’ I think.

    I hope this helps you to solve this bug and also helps other users.

    Thanks for your help.

    Plugin Support Juan Coronel

    (@juaancmendez)

    Hello there,
    thanks for contacting us!

    I’ll be contacting the developer about this and will let you know as soon as I have any updates.

    Thanks for your report!

    Best regards.

    We may have the same problem. All updates up to date.

    Here is the excerpt from error.log:

    Mon Jan 27 00:16:23.006876 2025] [fcgid:warn] [pid 3095542:tid 3095659] [client 54.37.234.0:64684] mod_fcgid: stderr: WordPress database error Too many keys specified; max 64 keys allowed for query ALTER TABLE wp_yith_wcwl_lists CHANGE COLUMN wishlist_token wishlist_token VARCHAR( 64 ) NOT NULL UNIQUE made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, YITH_WCWL_Install->maybe_install, YITH_WCWL_DB::maybe_update, YITH_WCWL_DB::create_tables, dbDelta, referer: https://shop.drogist-n.de/shop/fragen-antworten-zum-shop/
    [Mon Jan 27 00:17:32.485034 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: WordPress database error Unknown character set: 'utf8mb4_unicode_ci' for query
    [Mon Jan 27 00:17:32.485047 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: \t\t\t\t\t\tCREATE TABLE wp_yith_wcwl_itemmeta (
    [Mon Jan 27 00:17:32.485050 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: \t\t\t\t\t\t\tmeta_id BIGINT( 20 ) NOT NULL AUTO_INCREMENT,
    [Mon Jan 27 00:17:32.485053 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: \t\t\t\t\t\t\tyith_wcwl_item_id BIGINT( 20 ) NOT NULL,
    [Mon Jan 27 00:17:32.485055 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: \t\t\t\t\t\t\tmeta_key varchar(255) NULL,
    [Mon Jan 27 00:17:32.485063 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: \t\t\t\t\t\t\tmeta_value longtext NULL,
    [Mon Jan 27 00:17:32.485066 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: \t\t\t\t\t\t\tPRIMARY KEY ( meta_id ),
    [Mon Jan 27 00:17:32.485069 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: \t\t\t\t\t\t\tKEY item_id ( yith_wcwl_item_id ),
    [Mon Jan 27 00:17:32.485072 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: \t\t\t\t\t\t\tKEY meta_key ( meta_key )
    [Mon Jan 27 00:17:32.485075 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: \t\t\t\t\t\t) DEFAULT CHARACTER SET utf8mb4_unicode_ci made by require('wp-blog-header.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, YITH_WCWL_Install->maybe_install, YITH_WCWL_DB::maybe_update, YITH_WCWL_DB::create_tables, dbDelta
    [Mon Jan 27 00:17:32.485080 2025] [fcgid:warn] [pid 3095543:tid 3095687] [client 192.0.113.0:58912] mod_fcgid: stderr: WordPress database error Too many keys specified; max 64 keys allowed for query ALTER TABLE wp_yith_wcwl_lists CHANGE COLUMN wishlist_token wishlist_token VARCHAR( 64 ) NOT NULL UNIQUE made by require('wp-blog-header.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, YITH_WCWL_Install->maybe_install, YITH_WCWL_DB::maybe_update, YITH_WCWL_DB::create_tables, dbDelta
    [Mon Jan 27 00:17:32.604094 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: WordPress database error Unknown character set: 'utf8mb4_unicode_ci' for query
    [Mon Jan 27 00:17:32.604108 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: \t\t\t\t\t\tCREATE TABLE wp_yith_wcwl_itemmeta (
    [Mon Jan 27 00:17:32.604111 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: \t\t\t\t\t\t\tmeta_id BIGINT( 20 ) NOT NULL AUTO_INCREMENT,
    [Mon Jan 27 00:17:32.604115 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: \t\t\t\t\t\t\tyith_wcwl_item_id BIGINT( 20 ) NOT NULL,
    [Mon Jan 27 00:17:32.604117 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: \t\t\t\t\t\t\tmeta_key varchar(255) NULL,
    [Mon Jan 27 00:17:32.604120 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: \t\t\t\t\t\t\tmeta_value longtext NULL,
    [Mon Jan 27 00:17:32.604122 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: \t\t\t\t\t\t\tPRIMARY KEY ( meta_id ),
    [Mon Jan 27 00:17:32.604124 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: \t\t\t\t\t\t\tKEY item_id ( yith_wcwl_item_id ),
    [Mon Jan 27 00:17:32.604126 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: \t\t\t\t\t\t\tKEY meta_key ( meta_key )
    [Mon Jan 27 00:17:32.604128 2025] [fcgid:warn] [pid 3095736:tid 3095766] [client 85.214.119.0:44636] mod_fcgid: stderr: \t\t\t\t\t\t) DEFAULT CHARACTER SET utf8mb4_unicode_ci made by 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, YITH_WCWL_Install->maybe_install, YITH_WCWL_DB::maybe_update, YITH_WCWL_DB::create_tables, dbDelta
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.