• Resolved ppwebox

    (@ppwebox)


    Hi

    The wp_wc_category_lookup table has been corrupting for some time on my local staging server, even if replaced from an older backup. “Got error 194 “Tablespace is missing for a table” from storage engine InnoDB”.

    Now, if I stop the mariadb server and remove the corresponding .frm and .idb files from the site directory in the mysql database folder, Woocommerce is supposed to rebuild any of its missing default tables when de- and activating again, but it does not. Neither do any of its tools.

    The strange thing is, that even if I stop the local mariadb server, copy the corresponding and healthy .frm and .idb files from the live server, replace the corrupt files, and restart again, a table check with mariadb-check -c will report the same corrupt error for that table.

    Hence, is there a way to manually rebuild the wp_wc_category_lookup table, or to force Woocommerce to recreate?

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

    (@ckadenge)

    Hi @ppwebox,

    Thank you for reaching out.

    I understand you’re having issues with the wp_wc_category_lookup table on your local staging server.

    While you mentioned that the issue is happening on your local staging server, would you mind manually disabling and deleting WooCommerce then reinstalling it to see if this will help re-create the tables?

    WooCommerce does not have an option to recreate its own tables, but reinstallation of the plugin might help solve your issue. Please be sure to have a full site backup, just in case you would like to restore your site to a previous version.

    Let us know how this goes.

    Thread Starter ppwebox

    (@ppwebox)

    Hi ckadenge

    Thanks for your input.

    I think the persistent error even after exchanging the two corrupt table files was due to not flushing the Redis object cache.

    I rebuilt the table from the exported table via live server, so this is fine. Disabling and re-enabling Woo did not create the wp_wc_category_lookup table. And if I correctly recall from a previous attempt, neither did deleting Woo. The “Tools” should provide an option to recreate missing Woo tables.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @ppwebox

    You are correct. While WooCommerce creates its tables upon installation, it usually does not automatically recreate them if they are deleted or corrupted.

    However, you can head over to WooCommerce → Status → Tools, and do the following to generate the missing table:

    • Update database – Update
    • Verify base database tables – Verify
    • WooCommerce transients – Clear
    • Expired transients – Clear
    • Clear template cache – Clear

    In the meantime, if you encounter any further issues or have additional questions, please don’t hesitate to reach out. We’re here to help.

    Thread Starter ppwebox

    (@ppwebox)

    Thanks, but I tried all WC tools and neither did generate the missing wp_wc_category_lookup table. Have you actually tested your advice?

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @ppwebox

    I don’t see any issue generating missing database tables using the update database tool; we don’t even have any known reports. If this doesn’t work on your site or setup, something else like a server-related issue, might be in play.

    However, did you try re-installing WooCommerce? Didn’t it help? If no, it’s best to ask for insight related to it on either the WooCommerce Advanced Facebook group or the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question.

    I wish I could help more, but hopefully, this gets you going in the right direction to get some further insight/information.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.