woocommerce / woocommerce-admin

(Deprecated) This plugin has been merged to woocommerce/woocommerce
https://woocommerce.github.io/woocommerce-admin/#/
Other
362 stars 146 forks source link

Latest Version of Woocommerce Admin crash sites #6527

Closed terra3110 closed 3 years ago

terra3110 commented 3 years ago

Hi,

the latest version of woocommerce-admin released 12 hours ago crashed two of my Sites: The error in the beginning means data memory not allowed:

Uncaught Exception: Ung\xc3\xbcltiger Datenspeicher in /home/www/htdocs/grundgesetz/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:107\nStack trace:\n#0 /home/www/htdocs/grundgesetz/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(139): WC_Data_Store->__construct('admin')\n#1 /home/www/htdocs/grundgesetz/wp-content/plugins/woocommerce-admin/src/Notes/Notes.php(109): WC_Data_Store::load('admin-note')\n#2 /home/www/htdocs/grundgesetz/wp-content/plugins/woocommerce-admin/src/Notes/DeactivatePlugin.php(60): Automattic\WooCommerce\Admin\Notes\Notes::delete_notes_with_name(Array)\n#3 /home/www/htdocs/grundgesetz/wp-content/plugins/woocommerce-admin/src/Composer/Package.php(137): Automattic\WooCommerce\Admin\Notes\DeactivatePlugin::delete_note()\n#4 /home/www/htdocs/grundgesetz/wp-includes/class-wp-hook.php(287): Automattic\WooCommerce\Admin\Composer\Package::check_outdated_wca_plugin('')\n#5 /home/www/htdocs/grundgesetz/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)\n#6 /h in /home/www/htdocs/grundgesetz/wp-content/plugins/woocommerce/includes/class-wc-data-store.php on line 107, referer: https://www.dasgrundgesetz.de/

Frank

adrianduffell commented 3 years ago

Hi @terra3110, thanks for reporting this, and sorry to hear it has crashed your sites.

I was able to reproduce this with 2.1.1 and main under the following conditions:

I have labelled this as a critical bug. Although WC 4.7 is not supported by 2.1.1, this feels like it will be a bad experience for a number of users due to the fatal error.

I have found two possible workarounds at present.

  1. Delete the note using SQL, for example:
    DELETE FROM wp_wc_admin_notes WHERE name = "wc-admin-deactivate-plugin"

or:

  1. Update the WooCommerce plugin prior to installing this version of WooCommerce Admin.

I am investigating further.

terra3110 commented 3 years ago

Hi Adrian,

Many thanks. Yes, that make sense. I will go back to my Client and ask them to reconsider an Update Request that I submitted last December already. The Update of WooCommerce depend on the Update of WB Bakery and the Client did not want at the time to approve the Update. Maybe they reconsider now.

Sorry for the work, but I hope it helps with other Websites as well that experience the same.

Cheers

Frank

On Mar 8, 2021, at 15:00, Adrian Duffell notifications@github.com wrote:

Hi @terra3110, thanks for reporting this, and sorry to hear it has crashed your sites.

I was able to reproduce this with 2.1.1 and main under the following conditions:

• WooCommerce 4.7 installed.

• TheDeactivate old WooCommerce Admin version note exists.

I have labelled this as a critical bug. Although WC 4.7 is not supported by 2.1.1, this feels like it will be a bad experience for a number of users due to the fatal error.

I have found two possible workarounds at present.

• Delete the note using SQL, for example: DELETE FROM wp_wc_admin_notes WHERE name = "wc-admin-deactivate-plugin"

or:

• Update the WooCommerce plugin prior to to installing this version of WooCommerce Admin. I am investigating further.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

adrianduffell commented 3 years ago

Update: I can reproduce this without the note being active. Steps to reproduce:

See fatal error:

Uncaught Exception: Invalid data store. in /srv/users/xxxxxx/apps/xxxxxx/public/wp-content/plugins/woocommerce/includes/class-wc-data-store.php:107
Stack trace:
#0 /srv/users/xxxxxx/apps/xxxxxx/public/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(139): WC_Data_Store->__construct('admin')
#1 /srv/users/xxxxxx/apps/xxxxxx/public/wp-content/plugins/woocommerce-admin/src/Notes/Notes.php(109): WC_Data_Store::load('admin-note')
#2 /srv/users/xxxxxx/apps/xxxxxx/public/wp-content/plugins/woocommerce-admin/src/Notes/DeactivatePlugin.php(60): Automattic\WooCommerce\Admin\Notes\Notes::delete_notes_with_name(Array)
#3 /srv/users/xxxxxx/apps/xxxxxx/public/wp-content/plugins/woocommerce-admin/src/Composer/Package.php(137): Automattic\WooCommerce\Admin\Notes\DeactivatePlugin::delete_note()
#4 /srv/users/xxxxxx/apps/xxxxxx/public/wp-includes/class-wp-hook.php(287): Automattic\WooCommerce\Admin\Composer\Package::check_outdated_wca_plugin in 
/srv/users/xxxxxx/apps/xxxxxx/public/wp-content/plugins/woocommerce/includes/class-wc-data-store.php
adrianduffell commented 3 years ago

Hi @terra3110, I have added more technical detail in a new issue https://github.com/woocommerce/woocommerce-admin/issues/6530.

We are currently working on a fix and I will report back here when that is available.

adrianduffell commented 3 years ago

Hi @terra3110, we have addressed this issue in version 2.1.2 of WooCommerce Admin, which should now be available for you to update to.

I will close the issue now, but please re-open if you continue to experience it.