Problem caused by compatibility with premium version of woocommerce-wholesale-prices plugin. Seems it changes the results of the search page and causes the issue. Once we disable plugin everything works fine.
Hi olga/ 8theme Team,
I talked to the plugin authors. I got that answer after investigating the bug:
Thanks for keeping in touch!
I apologize for the late reply. I’ve visited your website and it seems there’s a conflict with your theme. I’ve tried to switch the theme to Twenty Seventeen and the search results show no error. Could you please also contact the theme support regarding this matter? It’ll be great if they can also help us identify the issue.
Please let me know how it goes. Looking forward to your reply 🙂
— Harry Moyles
Wholesale Suite <email@example.com>
I know that errors are only show up in the latest versions of the theme. In the beginning there were not such an error.
Thank you for your support.
We added search by SKU and made fixes to show the search results in the correct way without duplicating products. As I told you before looks like that plugin also replaces the results of the search page by their own results and that’s why it conflicts with the theme. We are ready to check their solution if they have tips how to avoid it but keep the correct work of theme search features. The plugin works fine with default theme because default theme does not have any additional options for search.
Hi Olga, the plugin authors found the problem. Would you please fix this in your next theme release? Would be great!
Thanks for sharing the theme files.
Okky here, support level two who will help you with this issue. Harry asked me to check this and see if there’s anything we can do.
I’ve just checked the theme and it seems they use the “posts_clauses” hooks to modify the product search query. Please keep in mind that using “posts_clauses” is not recommended to modify the query as stated in the WordPress documentation here https://codex.wordpress.org/Plugin_API/Filter_Reference/posts_clauses:
The posts_clauses filter runs before the query gets executed and is essentially the sum of all filters that run immediately before it. So it should be used if you don’t intend to let another plugin override it, or if you need to alter several different parts of the query at once.
The problem is that your theme has this code in “wp-content/themes/xstore-responsive-woocommerce-theme-wordpress-theme/xstore/framework/theme-functions.php” on line 824:
$pieces[‘join’] .= “JOIN $wpdb->postmeta on $wpdb->posts.ID = $wpdb->postmeta.post_id”;
Because it’s coded to add the JOIN query instead of replacing it, it produces multiple JOINs in the query:
JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )JOIN wp_postmeta on wp_posts.ID = wp_postmeta.post_id
For now, I suggest to change the code to this one:
$pieces[‘join’] = “JOIN $wpdb->postmeta on $wpdb->posts.ID = $wpdb->postmeta.post_id”;
Also, please ask the theme author to use the “pre_get_posts” filter instead of the “posts_clauses” if they only need to modify the meta query.
I hope this helps 🙂
— Development Team
WholesaleSuite – WooCommerce plugins that help you sell to wholesale customers
find the login credentials attached.
Are youre changes update save? So I can get the next xtore update?
Please tell me when all is done.
THANK YOU for all your effort!
thank you but the Blog post search isn’t working. Check link in private content! There are posts with that search phrase.
I never had such problems with WordPress search before.
Thank you :). Great support!
when Im not logged in and use the search, Products search is working but not post search. Please log out and click on the link in private content…. No posts were shown.
I see that you have 2 WooCommerce Wholesale Prices – premium version and simple http://prntscr.com/gldrgc . Should you keep both enabled? Because once I disable the simple version and only premium version stays then search result page displays posts, pages and products as with default theme. Also, plugin does not allow to show only posts on the results page.
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.
The message was successfully sent
Your shopping cart is empty