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 2 years, 11 months ago.
- AuthorPosts
- April 30, 2020 at 6:47 am #27019
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.
April 30, 2020 at 8:02 am #27020Hi,
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.
Best,
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)
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
April 30, 2020 at 8:03 am #27022HI its a live site. this maybe tricky can you suggest a fix (i can code php), then I ll try and implement
April 30, 2020 at 8:05 am #27023This is the only place in the theme it calls it:
return $products = new WP_Query( apply_filters( ‘woocommerce_shortcode_products_query’, $args, $atts ) );
April 30, 2020 at 8:08 am #27024Okay, 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 pluginIf 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 :)
April 30, 2020 at 3:01 pm #27036Seems to work!
April 30, 2020 at 3:02 pm #27037Great! 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 :)
- AuthorPosts
You must be logged in to reply to this topic.