Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1227195

    Dear support,
    my site has problems. When i hover the “Produkte” Megamenu on the homepage everything seems fine wit the menu. When i change to a category the hole menu is shifted to the left. If i want to show a single product the product images do not show up anymore.

    I activated debuging and get the following error: Fatal error: Uncaught ArgumentCountError: Too few arguments to function action_woocommerce_after_main_content(),
    Is this a known issue?

    Thanks dondela

    • This topic was modified 4 years, 5 months ago by dondela. Reason: activated debugging
    #1227382

    Hey dondela,

    Please try the following in Quick CSS under Enfold->General Styling:

    .woocommerce .avia_mega_div {
      right: -300px;
    }

    Best regards,
    Rikard

    #1227403

    Hey Rikard,
    thanks for helping.
    This css doesn`t avoid the Fatal error: Uncaught ArgumentCountError: Too few arguments to function action_woocommerce_after_main_content(),

    The code which is written in this function is not executed after the error:
    // define the woocommerce_after_main_content callback
    function action_woocommerce_after_main_content( $woocommerce_output_content_wrapper_end, $int ) {
    // make action magic happen here…

    You see this error at the bottom of the page, i have activated wp_debug.

    #1227641

    Hi,

    The error seems to be coming from your child theme, please check the code which on that line.

    Best regards,
    Rikard

    #1227773

    I created a staging-site to find a solution for the error. I am not sure if this is a woocommerce-problem or the way the theme is transferring the function?

    This line of code in the function.php causes the error:

    // define the woocommerce_after_main_content callback 
     function action_woocommerce_after_main_content( $woocommerce_output_content_wrapper_end, $int ) { 

    The error message is:
    Fatal error: Uncaught ArgumentCountError: Too few arguments to function action_woocommerce_after_main_content(), 1 passed in /html/shop-proditool-2018/stage/wp-includes/class-wp-hook.php on line 287 and exactly 2 expected in /html/shop-proditool-2018/stage/wp-content/themes/enfold-child/functions.php:83 Stack trace: #0 /html/shop-proditool-2018/stage/wp-includes/class-wp-hook.php(287): action_woocommerce_after_main_content(”) #1 /html/shop-proditool-2018/stage/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #2 /html/shop-proditool-2018/stage/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #3 /html/shop-proditool-2018/stage/wp-content/themes/enfold-child/woocommerce/archive-product.php(100): do_action(‘woocommerce_aft…’) #4 /html/shop-proditool-2018/stage/wp-content/plugins/woocommerce/includes/wc-core-functions.php(251): include(‘/html/shop-prod…’) #5 /html/shop-proditool-2018/stage/wp-content/plugins/woocommerce/templates/taxonomy-product_cat.php(22): wc_get_template(‘archive-product.. in /html/shop-proditool-2018/stage/wp-content/themes/enfold-child/functions.php on line 83

    #1227986

    Hi,

    I’m not sure exactly what is going wrong, but it’s on line 83 in your child theme. The function starts with this:

    function action_woocommerce_after_main_content( $woocommerce_output_content_wrapper_end, $int ) {

    Here’s some documentation on the hook: http://hookr.io/actions/woocommerce_after_main_content/.

    Please note that this is likely not theme related. You can test that by activating one of the default WordPress themes for example.

    Best regards,
    Rikard

    #1228260

    Dear, support.
    I know that this line is causing the error. Earlyer i had similar problems, which was fixed by the theme update. Please refer to his post:https://kriesi.at/support/topic/action_woocommerce_after_main_content-stopped-working/#post-1073431
    Yigit gave me an enfold beta-version which fixed the hook again. So i assume this time it could be a theme related problem as well?

    #1228588

    Hi Dondela!

    I have edited 82th and 699th lines in functions.php file of your child theme and that seemed to help. Could you please review your website and let us know if it works correctly on all product categories?

    Best regards,
    Yigit

    #1228621

    Dear Yigit,
    awesome, this fixed it!
    Thanks for your great support :-)

    #1228624

    Hi,

    You are always welcome! Let us know if you have any other questions or issues :)

    Best regards,
    Yigit

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘WooCommerce broken after update’ is closed to new replies.