Martin ?najdr
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] WooCommerce admin product search not workingWell after a lot of hours of looking for a solution I realized, that I didn’t implemented your solution with all plugins deactivated. So I deactivated them all (except WooCommerce and Relavanssi) and I found out there is some kind of bug in Yoast SEO plugin. If I turn off the “Text link counter” Yoast SEO feature and it works!!!
Mysteries of the WP universe I guess ??
Forum: Plugins
In reply to: [Relevanssi - A Better Search] WooCommerce admin product search not workingWell I tried your fix, but I still can’t get it working. It seems that QM now shows relevanssi_search query (but also the default WooCommerce search query), but the search is not returning any results. I have some custom fields (we are using something like custom second type of product SKU) specified directly in Relevanssi settings, it works perfectly outside admin (I search for specific secondary SKU, it returns single product), but still not returning any results in admin. It seems that the search_products function is still somehow overriding the final results or I don’t know…
Forum: Plugins
In reply to: [Relevanssi - A Better Search] WooCommerce admin product search not workingThank you for your response.
Yes, that is the page. I tried to disable all plugins – except Relevanssi, WooCommerce and Query Monitor (I’m running WP 4.9.5, WooCommerce 3.3.4, Relevanssi 4.0.7 and Query Monitor 2.17.0) and I still got this problem.
When I search for a post in admin
/wp-admin/edit.php
, the QM show, that the relevanssi_search function was used for searching, when I search for products on/wp-admin/edit.php?post_type=product
, QM shows that WC_Product_Data_Store_CPT->search_products() function was used.Forum: Plugins
In reply to: [Relevanssi - A Better Search] Revanssi & WoocommerceIf you change:
$meta_query[] = array('key' => $query->query_vars["meta_key"], 'value' => $value, 'compare' => $compare);
to
$meta_query[] = array('key' => $query->query_vars["meta_key"]);
on line 995 in search.php – it solves the problem for WooCommerce.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Revanssi & WoocommerceThe problem is in search.php file and it is caused by meta_query. My products are defaulty sorted by total_sales postmeta and the meta_query for total_sales created by relevanssi is badly defined – total sales have no “compare” or “value”.
I deleted value and compare from line 995 in search.php and now it is working.
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Revanssi & WoocommerceExactly the same problem as described by gareth with the latest WooCommerce version.
Forum: Fixing WordPress
In reply to: Subscriber role – blank pageWP allows subscribers to see the dashboard – but with limited access. Just try it.
Forum: Fixing WordPress
In reply to: Subscriber role – blank pageWell it seems that WooCommerce works this way – it prevents users without edit_posts capability to get to the dashboard. And you can’t turn it off without making changes in the WooCommerce source code.
Not a good solution IMO, but I’m closing this topic as resolved, because it is not a bug.
Forum: Fixing WordPress
In reply to: Subscriber role – blank pageWell after a few hours of research I realized it is problem with the WooCommerce plugin. So I opened an issue on github.
Forum: Plugins
In reply to: New Media Manager – close/unload eventThank you for your reply, much improved snippet!
Forum: Plugins
In reply to: New Media Manager – close/unload eventOk, I found the solution (maybe not the best, but it’s working).
if(typeof wp !== 'undefined'){ var frame = wp.media.editor.add('content'); frame.on('escape', function(){ //Do some stuff here }); }