• Resolved garywatson

    (@garywatson)


    When opening Marketing\Coupons in WordPress admin, we see a page with the following message…

    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    When we look at the Apache error log, we see the following…

    mod_fcgid: stderr: PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function Automattic\\WooCommerce\\Admin\\Loader::get_script_asset_filename(), 1 passed in /home/[removed]/public_html/shop/wp-content/plugins/woocommerce-admin/src/Features/Coupons.php on line 132 and exactly 2 expected in /home/[removed]/public_html/shop/wp-content/plugins/woocommerce-admin/src/Loader.php:255, referer: https://www.[removed].co.uk/shop/wp-admin/
    
    mod_fcgid: stderr: Stack trace:, referer: https://www.[removed].co.uk/shop/wp-admin/
    [Fri May 07 13:53:22.891220 2021] [fcgid:warn] [pid 9185] [client 82.30.172.152:23138] mod_fcgid: stderr: #0 /home/[removed]/public_html/shop/wp-content/plugins/woocommerce-admin/src/Features/Coupons.php(132): Automattic\\WooCommerce\\Admin\\Loader::get_script_asset_filename(), referer: https://www.[removed].co.uk/shop/wp-admin/
    
    mod_fcgid: stderr: #1 /home/[removed]/public_html/shop/wp-includes/class-wp-hook.php(292): Automattic\\WooCommerce\\Admin\\Features\\Coupons->maybe_add_marketing_coupon_script(), referer: https://www.[removed].co.uk/shop/wp-admin/
    
    mod_fcgid: stderr: #2 /home/[removed]/public_html/shop/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(), referer: https://www.[removed].co.uk/shop/wp-admin/
    
    mod_fcgid: stderr: #3 /home/[removed]/public_html/shop/wp-includes/plugin.php(484): WP_Hook->do_action(), referer: https://www.[removed].co.uk/shop/wp-admin/
    
    mod_fcgid: stderr: #4 /home/[removed]/public_html/shop/wp-admin/admin-header.php(102): do_action(), referer: https://www.[removed].co.uk/shop/wp-admin/
    
    mod_fcgid: stderr: #5 /home/[removed]/public_html/shop/wp-admin/edit.php(394 in /home/[removed]/public_html/shop/wp-content/plugins/woocommerce-admin/src/Loader.php on line 255, referer: https://www.[removed].co.uk/shop/wp-admin/

    We have performed the conflict test as described here and we see that when the WooCommerce Admin plug-in is disabled, the Coupon page loads without error.

    We are running the latest versions of WordPress core, theme and plug-ins.

    Perhaps there was a bug introduced in your last update?

    Let me know any other information you need to assist.

    Gary

    • This topic was modified 3 years, 6 months ago by garywatson.
Viewing 3 replies - 1 through 3 (of 3 total)
  • I have the same problem, appearing when opening Coupon page.

    
    Fatal error: Uncaught ArgumentCountError: Too few arguments to function Automattic\WooCommerce\Admin\Loader::get_script_asset_filename(), 1 passed in /www/htdocs/w013c0c2/[removed]/wp-content/plugins/woocommerce-admin/src/Features/Coupons.php on line 132 and exactly 2 expected in /www/htdocs/w013c0c2/[removed]/wp-content/plugins/woocommerce-admin/src/Loader.php:255 Stack trace: #0 /www/htdocs/w013c0c2/[removed]/wp-content/plugins/woocommerce-admin/src/Features/Coupons.php(132): Automattic\WooCommerce\Admin\Loader::get_script_asset_filename('marketing-coupo...') #1 /www/htdocs/w013c0c2/[removed]/wp-includes/class-wp-hook.php(292): Automattic\WooCommerce\Admin\Features\Coupons->maybe_add_marketing_coupon_script('edit.php') #2 /www/htdocs/w013c0c2/[removed]/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #3 /www/htdocs/w013c0c2/[removed]/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /www/htdocs/w013c0c2/[removed]/wp-admin/admin-header.php(102): do_action('admin_enqueue in /www/htdocs/w013c0c2/[removed]/wp-content/plugins/woocommerce-admin/src/Loader.php on line 255
    
    Es gab einen kritischen Fehler auf deiner Website. Bitte überprüfe den Posteingang deiner Website-Administrator-E-Mail-Adresse für weitere Anweisungen.
    
    Erfahre mehr über die Problembehandlung in WordPress.
    
    Thread Starter garywatson

    (@garywatson)

    This was a known issue that was fixed in v2.2.5…

    https://github.com/woocommerce/woocommerce-admin/pull/6955

    Hi @garywatson – looks like this was actually merged in v2.3.0.
    If you’re using the standalone Admin plugin, you should now see that fix applied.
    If you’re using the packaged version in WooCommerce, this has not yet been updated via the package, which is still only at v2.2.6.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘There has been a critical error on this website’ is closed to new replies.