-
AuthorPosts
-
July 1, 2020 at 9:57 am #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, 4 months ago by dondela. Reason: activated debugging
July 2, 2020 at 5:48 am #1227382Hey dondela,
Please try the following in Quick CSS under Enfold->General Styling:
.woocommerce .avia_mega_div { right: -300px; }
Best regards,
RikardJuly 2, 2020 at 8:14 am #1227403Hey 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.
July 3, 2020 at 6:12 am #1227641Hi,
The error seems to be coming from your child theme, please check the code which on that line.
Best regards,
RikardJuly 3, 2020 at 3:19 pm #1227773I 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 83July 5, 2020 at 5:49 am #1227986Hi,
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,
RikardJuly 6, 2020 at 12:25 pm #1228260Dear, 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?July 7, 2020 at 1:43 pm #1228588Hi 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,
YigitJuly 7, 2020 at 3:59 pm #1228621Dear Yigit,
awesome, this fixed it!
Thanks for your great support :-)July 7, 2020 at 4:08 pm #1228624 -
AuthorPosts
- The topic ‘WooCommerce broken after update’ is closed to new replies.