Support » Plugin: WooCommerce Blocks » Error Assets

  • Resolved asasergey

    (@asasergey)


    Hi

    Psole updates to 2.5.0, a critical problem has occurred on the site.

    Of the errors present:

    PHP Fatal error: Uncaught Error: Call to a member function get_countries() on null in …/wp-content/plugins/woo-gutenberg-products-block/src/Assets/AssetDataRegistry.php:81
    Stack trace:
    #0 …/wp-content/plugins/woo-gutenberg-products-block/src/Assets/BackCompatAssetDataRegistry.php(56): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->get_core_data()
    #1 …/wp-content/plugins/woo-gutenberg-products-block/src/Assets/AssetDataRegistry.php(140): Automattic\WooCommerce\Blocks\Assets\BackCompatAssetDataRegistry->get_core_data()
    #2 …/wp-content/plugins/woo-gutenberg-products-block/src/Assets/BackCompatAssetDataRegistry.php(25): Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry->initialize_core_data()
    #3 …/wp-includes/class-wp-hook.php(288): Automattic\WooCommerce\Blocks\Assets\BackCompatAssetDataRegistry->enqueue_asset_data(”)
    #4 …/wp-includes/class-wp-hook.php(312): WP_Hook- in …/wp-content/plugins/woo-gutenberg-products-block/src/Assets/AssetDataRegistry.php on line 81

    Rolled back to version 2.4.4.
    There are no problems so far.

    PHP version 7.3.11
    WordPress version 5.3
    WooCommerce 3.8.0
    MySQL версии 5.7.28

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Albert Juhé Lluveras

    (@aljullu)

    Hi @asasergey, thanks for testing the last version of WooCommerce Blocks, I’m unable to reproduce this issue, so I would appreciate if you could give us some more information:

    • What settings do you have in <i>WooCommerce</i> > <i>Settings</i> > <i>General</i> > <i>Selling location(s)</i> and <i>Sell to specific countries</i>?
    • Do you have any plugin that might be modifying the list of countries available? I would suggest trying to deactivate all plugins but WooCommerce and WooCommerce Blocks and check if the error still appears. If it doesn’t, that means there is a conflict with another plugin, so I would try activating the other plugins one by one until finding which one is the conflicting one.

    Hi @aljullu

    Yes, in woocommerce settings, sales are limited to certain countries.
    The plugin Country Based Restrictions for WooCommerce is installed – restricting the sale of products to certain countries.

    Unfortunately, right now there is no way to test a clean install of WooCommerce and WooCommerce Blocks.

    Best regards, Sergey

    Plugin Support Fernando

    (@fhaps)

    Automattic Happiness Engineer

    @asasergey I have been unable to reproduce this error on a site of my own, with the same versions of WordPress and WooCommerce.

    Because of this, I think the issue might be specific to your site setup, rather than a widespread bug in the plugin. Like Albert suggested above, we’d recommend testing this with just WooCommerce and WooCommerce Blocks enabled. However, don’t try to do this on your live site.

    Instead, we’d recommend trying this out on a staging copy of your site. A staging site is a clone of your live website that you can modify without risking any changes or damages to your actual site. You can create a new staging environment using a plugin like WP Staging – this will let you deploy a copy of your website with minimal work.

    Hi @fhaps

    Thanks for the info. In the near future I will try to test step by step.

    Plugin Support Fernando

    (@fhaps)

    Automattic Happiness Engineer

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

    Hi @fhaps

    I could not test the error. But in version 2.5.2 there is no error.

    Thanks.

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