This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Critical error when installing plugin

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Critical error when installing plugin

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27019
    thedmlab18thedmlab18
    Participant

    Hi I m getting this error:

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function WD_ASP_Elementor_Filter::products(), 2 passed in /var/www/vhosts/locally-sourced.co.uk/httpdocs/wp-includes/class-wp-hook.php on line 287 and exactly 3 expected in /var/www/vhosts/locally-sourced.co.uk/httpdocs/wp-content/plugins/ajax-search-pro/includes/classes/filters/class-asp-elementor.php:71 Stack trace: #0 /var/www/vhosts/locally-sourced.co.uk/httpdocs/wp-includes/class-wp-hook.php(287): WD_ASP_Elementor_Filter->products(Array, Array) #1 /var/www/vhosts/locally-sourced.co.uk/httpdocs/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array) #2 /var/www/vhosts/locally-sourced.co.uk/httpdocs/wp-content/themes/funiter/framework/framework.php(326): apply_filters(‘woocommerce_sho…’, Array, Array) #3 /var/www/vhosts/locally-sourced.co.uk/httpdocs/wp-includes/class-wp-hook.php(287): Funiter_framework->funiter_getProducts(Array) #4 /var/www/vhosts/locally-sourced.co.uk/httpdocs/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array) in /var/www/vhosts/locally-sourced.co.uk/httpdocs/wp-content/plugins/ajax-search-pro/includes/classes/filters/class-asp-elementor.php on line 71

    When installing the plugin.

    #27020
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    The error seems to be related to the theme framework, when they call the “woocommerce_shortcode_products_query” hook, with only 2 arguments instead of 3.
    Can you please add temporary FTP and back-end details? I would like to see if there is any way to prevent that (either with a plugin or theme change)

    #27022
    thedmlab18thedmlab18
    Participant

    HI its a live site. this maybe tricky can you suggest a fix (i can code php), then I ll try and implement

    #27023
    thedmlab18thedmlab18
    Participant

    This is the only place in the theme it calls it:

    return $products = new WP_Query( apply_filters( ‘woocommerce_shortcode_products_query’, $args, $atts ) );

    #27024
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Okay, that actually helps.

    Instead of makin a change to that, can you try:
    – Opening this file on your server: wp-content/plugins/ajax-search-pro/includes/classes/filters/class-asp-elementor.php
    – Replacing it’s contents with this: https://gist.github.com/anag0/c8b071a721e73b98d0ab160215ed39d2
    – Save & Activate the plugin

    If that works, I can include it in the upcoming release.

    #27036
    thedmlab18thedmlab18
    Participant

    Seems to work!

    #27037
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Great! I will include this in the next release then.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.