• Resolved mcyann

    (@mcyann)


    Hello, I have a problem with the database on a site that has existed for 2 years. I wanted to install Woo-commerce, and I have several errors in several places that concern this for example: [Duplicate entry ‘0’ for key ‘PRIMARY’] INSERT INTO wor6472_usermeta (user_id, meta_key, meta_value) VALUES (1, ‘manageedit-productcolumnshidden_default’, ‘1’)

    I searched and found that this was due to auto-increment not being enabled. So I activated it in phpMyAdmin. But on the usermeta table, I get this error: #1062 – ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry ‘1’ for key ‘PRIMARY’

    For all other tables it worked.

    Can you help me?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi there @mcyann,

    Thanks for reaching out.

    I get this error: #1062 – ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry ‘1’ for key ‘PRIMARY’

    Based on the error messages that you’ve provided, it seems you’re encountering a conflict with duplicate entries in your database. This can happen when the auto-increment feature is not properly configured.

    To solve this, I’d recommend you remove the record with ‘0’ for the primary key field in your database, and this should fix the issue.

    Please be sure to perform a backup before making any changes to your database.

    I hope this helps.

    Thread Starter mcyann

    (@mcyann)

    good morning,

    thank you for your reply, is this the first line? But it’s strange because it’s the token… I’m not sure I’m in the right place… Thanks a lot!

    https://ibb.co/fXJRJk9

    • This reply was modified 9 months ago by mcyann.
    • This reply was modified 9 months ago by mcyann.
    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi again @mcyann,

    As an alternative solution to your problem, I suggest running the following command in your database:

    REPAIR TABLE wp_options

    You can find more details from this external link.

    Let us know how it goes.

    Thread Starter mcyann

    (@mcyann)

    Hello, thank you!

    but unfortunately SQl replies that this type of table does not support “repair”.

    Thread Starter mcyann

    (@mcyann)

    there is a primary key on the table, it’s linked to the table that’s causing the problem…

    https://ibb.co/yP7jv78

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @mcyann,

    Based on the information provided, I think you’d have to check on the table if there’s any umeta_id with a value of 0 or negative and set it to a positive value; then, you should be able to set the auto-increment. (learn more here).

    However, I have to inform you that this is outside of our support scope as the problem lies with your code WordPress install, not with WooCommerce specifically. If you need further help I’d recommend asking here: https://www.ads-software.com/support/forum/how-to-and-troubleshooting/.

    All the best,
    Omar

    Thread Starter mcyann

    (@mcyann)

    Hello, your solution is the right one, it solved my problem.

    Thank you very much.

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi again,

    Thank you for the update! I’m happy to learn it’s resolved. In your initial post you mentioned you had several issues. To confirm, are you able to install WooCommerce now, or is anything else impeding it?

    Cheers!
    Omar

    Thread Starter mcyann

    (@mcyann)

    yes, there were other problems, e.g. I couldn’t create categories. But the solution you proposed solved that problem, I just had to find the right table!

    I haven’t been able to test everything yet, but I think it’s fine, and woo-commerce seems to be working as it should.

    Thanks

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @mcyann,

    I’m glad we were able to help!

    If you have a few minutes, we’d love if you could leave us a review: https://www.ads-software.com/support/plugin/woocommerce/reviews/

    Thread Starter mcyann

    (@mcyann)

    Hello,

    I’m sorry, but I’m still having problems with woo-commerce…

    I’ve started to create products. The site is slow, and I am regularly confronted with 403 errors, or error pages like this one:

    Notice: require(): Read of 4951 bytes failed with errno=12 Cannot allocate memory in /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-services/vendor/jetpack-autoloader/class-php-autoloader.php on line 90

    Notice: require(): Read of 4951 bytes failed with errno=12 Cannot allocate memory in /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-services/vendor/jetpack-autoloader/class-php-autoloader.php on line 90

    Warning: Class “Automattic\WooCommerce\StoreApi\Schemas\V1\AbstractAddressSchema” not found in /home/mguqjrsg/public_html/wp-content/plugins/woocommerce/src/StoreApi/deprecated.php on line 73

    Fatal error: Uncaught Error: Failed opening required ‘/home/mguqjrsg/public_html/wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/AbstractSchema.php’ (include_path=’.:/opt/alt/php80/usr/share/pear:/opt/alt/php80/usr/share/php:/usr/share/pear:/usr/share/php’) in /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-services/vendor/jetpack-autoloader/class-php-autoloader.php:90 Stack trace: #0 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce/src/StoreApi/Schemas/V1/AbstractAddressSchema.php(14): Automattic\Jetpack\Autoloader\jp6d1e7e08dd80d4351e75c880bf886917\al3_0_2\PHP_Autoloader::load_class() #1 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-services/vendor/jetpack-autoloader/class-php-autoloader.php(90): require(‘/home/mguqjrsg/…’) #2 [internal function]: Automattic\Jetpack\Autoloader\jp6d1e7e08dd80d4351e75c880bf886917\al3_0_2\PHP_Autoloader::load_class() #3 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce/src/StoreApi/deprecated.php(73): class_alias() #4 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-services/vendor/jetpack-autoloader/class-version-loader.php(89): require_once(‘/home/mguqjrsg/…’) #5 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-services/vendor/jetpack-autoloader/class-autoloader-handler.php(124): Automattic\Jetpack\Autoloader\jp6d1e7e08dd80d4351e75c880bf886917\al3_0_2\Version_Loader->load_filemap() #6 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-services/vendor/jetpack-autoloader/class-autoloader.php(80): Automattic\Jetpack\Autoloader\jp6d1e7e08dd80d4351e75c880bf886917\al3_0_2\Autoloader_Handler->activate_autoloader() #7 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-services/vendor/autoload_packages.php(13): Automattic\Jetpack\Autoloader\jp6d1e7e08dd80d4351e75c880bf886917\al3_0_2\Autoloader::init() #8 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-payments/vendor/jetpack-autoloader/class-latest-autoloader-guard.php(80): require(‘/home/mguqjrsg/…’) #9 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-payments/vendor/jetpack-autoloader/class-autoloader.php(75): Automattic\Jetpack\Autoloader\jpc77c6f448183a14790ec1fee9fc3636e\Latest_Autoloader_Guard->should_stop_init() #10 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-payments/vendor/autoload_packages.php(13): Automattic\Jetpack\Autoloader\jpc77c6f448183a14790ec1fee9fc3636e\Autoloader::init() #11 /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-payments/woocommerce-payments.php(26): require_once(‘/home/mguqjrsg/…’) #12 /home/mguqjrsg/public_html/wp-settings.php(473): include_once(‘/home/mguqjrsg/…’) #13 /home/mguqjrsg/public_html/wp-config.php(104): require_once(‘/home/mguqjrsg/…’) #14 /home/mguqjrsg/public_html/wp-load.php(50): require_once(‘/home/mguqjrsg/…’) #15 /home/mguqjrsg/public_html/wp-admin/admin.php(34): require_once(‘/home/mguqjrsg/…’) #16 /home/mguqjrsg/public_html/wp-admin/edit.php(10): require_once(‘/home/mguqjrsg/…’) #17 {main} thrown in /home/mguqjrsg/public_html/wp-content/plugins/woocommerce-services/vendor/jetpack-autoloader/class-php-autoloader.php on line 90

    can you help me?

    Thanks!

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hello again @mcyann,

    We’re sorry to hear that you’re still experiencing issues.

    Based on the errors you’ve shared, it seems like there’s a memory allocation issue. Here’s what you can do to troubleshoot this:

    1. Increase PHP Memory Limit to 512MB and check if the issue persists.
    2. Make sure to update all your plugins to the latest versions.
    3. Disable any unused plugins.

    Let us know if this helps.

    Thread Starter mcyann

    (@mcyann)

    Hello

    thank you! i found the problem, the memory-limit parameter in php was good, but the host had set the server configuration too light (1gb of memory and 1 core). he upgraded it to 2gb of memory and 2 cores, and everything works as it should…

    Thanks again for your help

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hello @mcyann,

    We’re glad to hear that the problem has been identified and resolved. It’s great that your host was able to upgrade your server configuration to accommodate your needs.

    I’ll mark this thread as resolved now.

    If you have any further questions, I recommend creating a new thread.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘pb with database’ is closed to new replies.