Support » Plugin: WooCommerce » Fatal error When upgrading database asked by woocommerce

  • Resolved mnmlthms

    (@mnmlthms)


    Hi, i recently updated to woocommerce 3.6 and experienced serious issues, similar reports can be found here: https://wordpress.org/support/topic/fatal-error-when-tyring-to-upgrade-databsse/

    issue 1: with custom theme and other plugin activated with woocommerce, i found out that all terms from custom attributions gone, and left with these error:

    SELECT DISTINCT t.*, tt.*, tm.*, tm.* FROM wp_terms AS t LEFT JOIN wp_termmeta ON ( t.term_id = wp_termmeta.term_id AND wp_termmeta.meta_key='order') INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_termmeta AS tm ON t.term_id = tm.term_id INNER JOIN wp_termmeta AS tm ON t.term_id = tm.term_id WHERE tt.taxonomy IN ('pa_color') AND t.slug = 'red' AND ( wp_termmeta.meta_key = 'order' OR wp_termmeta.meta_key IS NULL ) AND tm.meta_key = 'image' AND tm.meta_key = 'color' ORDER BY tm.meta_value+0 ASC, t.name ASC LIMIT 1
    

    issue 2: i tried to revert from old backup, and disabled all other plugins, use default twenty nineteen theme, upgrade wordpress: everything works fine, upgrade woocommerce, works fine, upgrade database asked by woocommerce, issue occurs:

    Fatal error: Uncaught RuntimeException: Error saving action: Unable to save action. in /Volumes/Data/Development/XAMPP/htdocs/demo/dev/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php:33 Stack trace: #0 /Volumes/Data/Development/XAMPP/htdocs/demo/dev/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php(109): ActionScheduler_wpPostStore->save_action(Object(ActionScheduler_Action)) #1 /Volumes/Data/Development/XAMPP/htdocs/demo/dev/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_ActionFactory.php(59): ActionScheduler_ActionFactory->store(Object(ActionScheduler_Action)) #2 /Volumes/Data/Development/XAMPP/htdocs/demo/dev/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/functions.php(18): ActionScheduler_ActionFactory->single('woocommerce_run...', Array, 1557326576, 'woocommerce-db-...') #3 /Volumes/Data/Develop in /Volumes/Data/Development/XAMPP/htdocs/demo/dev/wp-content/plugins/woocommerce/includes/libraries/action-scheduler/classes/ActionScheduler_wpPostStore.php on line 33

    Please have a look into these issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Seems like a server timeout during the update process. Did you update the plugin via the backend?
    Thats not a good way. Best praactice would be to update the plugin with WP CLI. Also the database update which is needed.

    • This reply was modified 3 months, 2 weeks ago by  braehler.

    Yes, i updated via the backend, but both on localhost and VPS, imma try WP CLI and report back.

    wp wc update command in WP-CLI should work well on larger databases.

    Plugin Support dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hi @mnmlthms

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thanks,

    After updated using WP CLI on localhost, product attributes vanished, showing these error:

    WordPress database error: [Not unique table/alias: 'tm']
    SELECT DISTINCT t.*, tt.*, tm.*, tm.* FROM wp_terms AS t LEFT JOIN wp_termmeta ON ( t.term_id = wp_termmeta.term_id AND wp_termmeta.meta_key='order') INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN wp_termmeta AS tm ON t.term_id = tm.term_id INNER JOIN wp_termmeta AS tm ON t.term_id = tm.term_id WHERE tt.taxonomy IN ('pa_color') AND tr.object_id IN (4535) AND ( ( wp_termmeta.meta_key = 'order' OR wp_termmeta.meta_key IS NULL ) ) AND tm.meta_key = 'image' AND tm.meta_key = 'color' ORDER BY tm.meta_value+0 ASC, t.name ASC
    

    i kept the updated database, revert to woocommerce version 3.5.2 with database and attributes showed up, so it must be something wrong with woocommerce 3.6.x Any idea?

    Thanks!

    • This reply was modified 2 months, 3 weeks ago by  mnmlthms.

    After various testing, i found out that WP Term Colors, WP Term Image conflict with woocommerce, after disabling these plugins, attributes came back.

    Plugin Support dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hi @mnmlthms

    After various testing, i found out that WP Term Colors, WP Term Image conflict with woocommerce, after disabling these plugins, attributes came back.

    Thanks for replying back here with the resolution and what caused the issue.

    I will now mark this as Resolved again as the original problem isn’t related to WooCommerce core.

    Thanks,

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