Critical error when installing plugin

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

This topic contains 6 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 3 years, 12 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27019
    thedmlab18
    thedmlab18
    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 Marcinko
    Ernest 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)

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27022
    thedmlab18
    thedmlab18
    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
    thedmlab18
    thedmlab18
    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 Marcinko
    Ernest 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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #27036
    thedmlab18
    thedmlab18
    Participant

    Seems to work!

    #27037
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

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

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.