Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #1050042

    Hey guys, getting a Fatal error with the new update.. Can you please help!!

    #1050172

    Hi 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
    Michael

    #1050270

    Hi,

    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,
    Rikard

    #1050430

    Thanks for this!

    #1050432

    details below:

    • This reply was modified 5 years, 11 months ago by eberswine.
    #1050936

    So 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…

    #1051496

    Hi,

    Can you please upgrade to php 7.2 please?

    Best regards,
    Basilis

    #1051497

    Server Info: Apache
    PHP Version: 7.2.12-1+ubuntu18.04.1+deb.sury.org+1

    #1052195

    Hi,

    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,
    Rikard

    #1052341

    I 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

    #1053112

    Hi,

    We have forwarded the issue to our developers so they can take a look.

    Best regards,
    Basilis

    #1053651

    Hi,

    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ünter

    #1053719

    Thanks 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.
    #1054037

    Hi,

    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ünter

    #1054293

    Just 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 :

    #1057144

    Hi,

    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ünter

    #1057390

    There it is!
    Thanks.

    That fixed it.

    I reported this bug to Woocommece.
    Thanks!

    #1057399

    Hi,

    Glad we could help you.

    Enjoy the theme and feel free to come back if you need further assistance.

    Best regards,
    Günter

Viewing 18 posts - 1 through 18 (of 18 total)
  • The topic ‘PHP 7 error !!’ is closed to new replies.