-
AuthorPosts
-
January 4, 2019 at 4:52 pm #1050042
Hey guys, getting a Fatal error with the new update.. Can you please help!!
January 5, 2019 at 4:36 am #1050172Hi eberswine
Please always add as much information to your support thread as possible. This will help anyone here to help you better without going back several times.
Useful information is:
– Used WordPress version
– Used Enfold version
– What the error message says
– How you tried to update
– Used PHP version
– etc.Cheers
MichaelJanuary 5, 2019 at 10:11 am #1050270Hi,
Do you have any functions added related to WooCommerce images sizes? If so then please try to remove them. If not then please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply. If we need FTP details then please include those as well.
Best regards,
RikardJanuary 5, 2019 at 11:54 pm #1050430Thanks for this!
January 6, 2019 at 12:00 am #1050432details below:
- This reply was modified 5 years, 11 months ago by eberswine.
January 7, 2019 at 4:14 pm #1050936So I set up a staging site and switched to a different theme, and it worked, no errors. So we isolated the error having to do with one of your woocommerce templates…
January 8, 2019 at 9:32 pm #1051496Hi,
Can you please upgrade to php 7.2 please?
Best regards,
BasilisJanuary 8, 2019 at 9:33 pm #1051497Server Info: Apache
PHP Version: 7.2.12-1+ubuntu18.04.1+deb.sury.org+1January 10, 2019 at 6:55 am #1052195Hi,
Thanks for the update, I see that you have a couple of functions related to WooCommerce in your functions.php file. What happens if you disable those temporarily?
Also, you have a lot of plugins installed on the site. Did you try to disable them to see if there is a conflict coming from any of them?
Best regards,
RikardJanuary 10, 2019 at 3:02 pm #1052341I have tried all of this.. The error directly associates your “template” – “function” ..
Fatal error: Uncaught ArgumentCountError: Too few arguments to function avia_wc_widget_product_image_size(), 5 passed and exactly 6 expected in /wp-content/themes/enfold/config-woocommerce/config.php:2299 Stack trace: #0
/wp-content/themes/enfold/config-woocommerce/config.php
January 12, 2019 at 3:07 pm #1053112Hi,
We have forwarded the issue to our developers so they can take a look.
Best regards,
BasilisJanuary 14, 2019 at 1:00 pm #1053651Hi,
I checked the problem with WooCommerce 3.5.3 and Enfold 4.5.2 (but should also be the same with prior versions)
In woocommerce\includes\abstracts\abstract-wc-product.php line 1835:
return apply_filters( 'woocommerce_product_get_image', $image, $this, $size, $attr, $placeholder, $image );
This is exactly the signature for our function definition with 6 parameters in enfold\config-woocommerce\config.php line 2251:
add_filter( 'woocommerce_product_get_image', 'avia_wc_widget_product_image_size', 10, 6 );
and line 2299:
function avia_wc_widget_product_image_size( $image, $product, $size, $attr, $placeholder, $image1 )
Might be one of your plugins or custom code hooks wrong into this filter or calls the filter with only 5 parameters.
Best regards,
GünterJanuary 14, 2019 at 4:00 pm #1053719Thanks for this, however I just tested this on my staging site:
I disabled ALL plugins except for “follow up emails and woocommerce”
I also have a child theme with nothing in the functions page, so no custom hooks. No template overrides either..
Still getting same error ( see private area for error ) when trying to manually send a “follow up”
I then switched over to another basic theme ( twentyseventeen ) and executed the email and it worked perfectly..
If ALL plugins are disabled and this is out of the box enfold .. It 99.9% shows me that it is the theme.. ??
- This reply was modified 5 years, 11 months ago by eberswine.
January 15, 2019 at 10:15 am #1054037Hi,
Seems to be a problem with woocommerce-follow-up-emails plugin. See private content below #3 and #4.
I do not have access to this plugin so I cannot check it – but the Stack trace in #3 shows the apply_filters call – probably this is the reason.
Best regards,
GünterJanuary 15, 2019 at 7:25 pm #1054293Just contacted Woocommerce support and they said it was most def. a theme issue..
Especially when I change themes,.. and it works then..Like I stated before, it only happens on ‘enfold’ theme…
From woocommerce support :
January 22, 2019 at 11:15 am #1057144Hi,
Sorry for the late reply but it took some time to get access to the plugin.
As I expected:
In plugins\woocommerce-follow-up-emails\templates\email-variables\item-prices-image.php line 46:
return apply_filters( 'woocommerce_product_get_image', $image, $product, $size, $attr, $placeholder );
There is one parameter missing.
The standard WC filter signature is with 6 parameters – see woocommerce\includes\abstracts\abstract-wc-product.php line 1835:
return apply_filters( 'woocommerce_product_get_image', $image, $this, $size, $attr, $placeholder, $image );
Please report it to the plugin authors to fix this.
As a temp. fix you can change in enfold\config-woocommerce\config.php line 2251:
add_filter( 'woocommerce_product_get_image', 'avia_wc_widget_product_image_size', 10, 6 );
to
add_filter( 'woocommerce_product_get_image', 'avia_wc_widget_product_image_size', 10, 5 );
and line 2299:
function avia_wc_widget_product_image_size( $image, $product, $size, $attr, $placeholder, $image1 )
to
function avia_wc_widget_product_image_size( $image, $product, $size, $attr, $placeholder )
Best regards,
GünterJanuary 22, 2019 at 7:12 pm #1057390There it is!
Thanks.That fixed it.
I reported this bug to Woocommece.
Thanks!January 22, 2019 at 7:19 pm #1057399 -
AuthorPosts
- The topic ‘PHP 7 error !!’ is closed to new replies.