Home › Toolset Professional Support › [Resolved] Incompatibility with SearchWP
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 6 replies, has 2 voices.
Last updated by Minesh 2 years, 6 months ago.
Assisted by: Minesh.
We use SearchWP plugin. We also created a Search archive to display the results. However, it seems that Toolset doesn't use SearchWP for search engine. When I deleted the Toolset search archive and used the WordPress default, I can see different results.
hidden link (Toolset search archive is used)
hidden link (WordPress default search archive)
You already have a copy of the site from a previous ticket.
Thank you.
Hello. Thank you for contacting the Toolset support.
Toolset offers the text search integration using the "relevanssi" plugin:
- https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/
The site copy you shared with previous ticket with Luo is no longer accessible. And in this case, I will require to access both staging site (new and stating).
It seems you build the search result archive using Toolset, so what if you check the query for both the search result archive it will help you to understand what post types or any other entity like ( custom fields etc..etcc) it includes in results.
If you can share admin access details for both staging site (new and staging) that will help me to check what query it builds.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
As I was guessing, here is the query generated when you use normal search (when block plugin is disable):
SELECT SQL_CALC_FOUND_ROWS s.id,s.source,s.site,SUM(relevance) AS relevance FROM (SELECT s.id,s.source,s.site,s.attribute,((SUM(s.occurrences) * CASE WHEN ( (s.source IN ('post.post','post.page','post.laboratory-product','post.scientific-product','post.brand','post.sparepart-consumable','post.software-application','post.standard','post.attachment') AND (s.attribute IN ('title','excerpt'))) OR (s.source = 'post.post' AND (s.attribute IN ('slug'))) OR (s.source = 'post.page' AND (s.attribute IN ('slug'))) OR (s.source = 'post.laboratory-product' AND (s.attribute IN ('meta.wpcf-lab-pr-short-description'))) OR (s.source = 'post.laboratory-product' AND (s.attribute IN ('taxonomy.lab-products-category'))) OR (s.source = 'post.scientific-product' AND (s.attribute IN ('meta.wpcf-sci-pr-short-description'))) OR (s.source = 'post.scientific-product' AND (s.attribute IN ('taxonomy.scientific-product-category'))) OR (s.source = 'post.brand' AND (s.attribute IN ('slug'))) OR (s.source = 'post.sparepart-consumable' AND (s.attribute IN ('slug'))) OR (s.source = 'post.software-application' AND (s.attribute IN ('slug'))) OR (s.source = 'post.standard' AND (s.attribute IN ('slug'))) OR (s.source = 'post.attachment' AND (s.attribute IN ('slug'))) ) THEN 300 WHEN ( (s.source = 'post.post' AND (s.attribute IN ('content'))) OR (s.source = 'post.page' AND (s.attribute IN ('content'))) OR (s.source = 'post.laboratory-product' AND (s.attribute IN ('content'))) OR (s.source = 'post.laboratory-product' AND (s.attribute IN ('meta.wpcf-lab-pr-key-features-1'))) OR (s.source = 'post.laboratory-product' AND (s.attribute IN ('meta.lab-pr-key-features-2'))) OR (s.source = 'post.scientific-product' AND (s.attribute IN ('content'))) OR (s.source = 'post.scientific-product' AND (s.attribute IN ('meta.wpcf-sci-pr-key-features-1'))) OR (s.source = 'post.scientific-product' AND (s.attribute IN ('meta.wpcf-sci-pr-key-features-2'))) OR (s.source = 'post.sparepart-consumable' AND (s.attribute IN ('content'))) OR (s.source = 'post.sparepart-consumable' AND (s.attribute IN ('meta.wpcf-spc-short-description'))) OR (s.source = 'post.software-application' AND (s.attribute IN ('content'))) OR (s.source = 'post.software-application' AND (s.attribute IN ('meta.wpcf-software-application-short-description'))) OR (s.source = 'post.software-application' AND (s.attribute IN ('meta.wpcf-software-application-top-description'))) ) THEN 150 WHEN ( (s.source = 'post.laboratory-product' AND (s.attribute IN ('meta.wpcf-lab-pr-specifications-1'))) OR (s.source = 'post.laboratory-product' AND (s.attribute IN ('meta.lab-pr-specifications-2'))) OR (s.source = 'post.scientific-product' AND (s.attribute IN ('meta.wpcf-sci-pr-specifications-1'))) OR (s.source = 'post.scientific-product' AND (s.attribute IN ('meta.wpcf-sci-pr-specifications-2'))) OR (s.source = 'post.brand' AND (s.attribute IN ('content'))) OR (s.source = 'post.standard' AND (s.attribute IN ('content'))) OR (s.source = 'post.standard' AND (s.attribute IN ('meta.wpcf-standard-short-descripion'))) OR (s.source = 'post.standard' AND (s.attribute IN ('meta.wpcf-standard-top-description'))) OR (s.source = 'post.attachment' AND (s.attribute IN ('document_content'))) OR (s.source = 'post.attachment' AND (s.attribute IN ('content'))) ) THEN 1 END) ) AS relevance FROM hQyqZ_searchwp_index s LEFT JOIN hQyqZ_posts s1 ON (s1.ID = s.id) WHERE 1=1 AND 1=1 AND s.token IN (29409,30323,39676,31301,31302,29450,387,29399) AND 1=1 AND ((s.source = 'post.post' AND (s.attribute IN ('title','content','slug','excerpt')) AND ( ( `s1`.`post_type` = 'post' ) AND ( `s1`.`post_status` IN ( 'publish' ) ) )) OR (s.source = 'post.page' AND (s.attribute IN ('title','content','slug','excerpt')) AND ( ( `s1`.`post_type` = 'page' ) AND ( `s1`.`post_status` IN ( 'publish' ) ) ) AND s.id NOT IN ( SELECT hQyqZ_posts.ID FROM hQyqZ_posts WHERE hQyqZ_posts.ID IN (SELECT ID FROM hQyqZ_posts WHERE ID IN ('10')) OR hQyqZ_posts.ID IN (SELECT ID FROM hQyqZ_posts WHERE ID IN ('3348')) )) OR (s.source = 'post.laboratory-product' AND (s.attribute IN ('title','content','excerpt','meta.wpcf-lab-pr-short-description','meta.wpcf-lab-pr-key-features-1','meta.lab-pr-key-features-2','meta.wpcf-lab-pr-specifications-1','meta.lab-pr-specifications-2','taxonomy.lab-products-category')) AND ( ( `s1`.`post_type` = 'laboratory-product' ) AND ( `s1`.`post_status` IN ( 'publish' ) ) )) OR (s.source = 'post.scientific-product' AND (s.attribute IN ('title','content','excerpt','meta.wpcf-sci-pr-short-description','meta.wpcf-sci-pr-key-features-1','meta.wpcf-sci-pr-key-features-2','meta.wpcf-sci-pr-specifications-1','meta.wpcf-sci-pr-specifications-2','taxonomy.scientific-product-category')) AND ( ( `s1`.`post_type` = 'scientific-product' ) AND ( `s1`.`post_status` IN ( 'publish' ) ) )) OR (s.source = 'post.brand' AND (s.attribute IN ('title','content','slug','excerpt')) AND ( ( `s1`.`post_type` = 'brand' ) AND ( `s1`.`post_status` IN ( 'publish' ) ) )) OR (s.source = 'post.sparepart-consumable' AND (s.attribute IN ('title','content','slug','excerpt','meta.wpcf-spc-short-description')) AND ( ( `s1`.`post_type` = 'sparepart-consumable' ) AND ( `s1`.`post_status` IN ( 'publish' ) ) )) OR (s.source = 'post.software-application' AND (s.attribute IN ('title','content','slug','excerpt','meta.wpcf-software-application-short-description','meta.wpcf-software-application-top-description')) AND ( ( `s1`.`post_type` = 'software-application' ) AND ( `s1`.`post_status` IN ( 'publish' ) ) )) OR (s.source = 'post.standard' AND (s.attribute IN ('title','content','slug','excerpt','meta.wpcf-standard-short-descripion','meta.wpcf-standard-top-description')) AND ( ( `s1`.`post_type` = 'standard' ) AND ( `s1`.`post_status` IN ( 'publish' ) ) )) OR (s.source = 'post.attachment' AND (s.attribute IN ('document_content','title','content','slug','excerpt')) AND ( ( `s1`.`post_type` = 'attachment' ) AND ( `s1`.`post_status` = 'inherit' ) ) AND s.id IN ( SELECT hQyqZ_posts.ID FROM hQyqZ_posts WHERE hQyqZ_posts.ID IN ( SELECT hQyqZ_posts.ID FROM hQyqZ_posts WHERE hQyqZ_posts.ID IN ('1748','1749','1754','1755','3632','3633','3635','5315')) ))) GROUP BY s.site,s.source,s.attribute,s.id) AS s LEFT JOIN hQyqZ_posts s1 ON (s1.ID = s.id) WHERE 1=1 AND (SUBSTRING(s.source, 1, 5) != 'post.' OR (SUBSTRING(s.source, 1, 5) = 'post.' AND s.id != '0')) GROUP BY s.site, s.source, s.id HAVING relevance > 0 ORDER BY relevance DESC LIMIT 0, 10
As you can see the search query is generated and order by relevance it seems its based on searchWP.
We do not have any official integration with searchWP. When you create archive using block, the resulted query is here:
SELECT SQL_CALC_FOUND_ROWS hQyqZ_posts.* FROM hQyqZ_posts WHERE 1=1 AND (((hQyqZ_posts.post_title LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Witeg{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}') OR (hQyqZ_posts.post_excerpt LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Witeg{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}') OR (hQyqZ_posts.post_content LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Witeg{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}')) AND ((hQyqZ_posts.post_title LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Shaking{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}') OR (hQyqZ_posts.post_excerpt LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Shaking{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}') OR (hQyqZ_posts.post_content LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Shaking{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}')) AND ((hQyqZ_posts.post_title LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Water{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}') OR (hQyqZ_posts.post_excerpt LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Water{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}') OR (hQyqZ_posts.post_content LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Water{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}')) AND ((hQyqZ_posts.post_title LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Bath{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}') OR (hQyqZ_posts.post_excerpt LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Bath{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}') OR (hQyqZ_posts.post_content LIKE '{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}Bath{224ec43d7be8e8f859809c4843c1317471ba645db3231fbefaf59c31f3cfea30}'))) AND hQyqZ_posts.post_type IN ('post', 'page', 'attachment', 'laboratory-product', 'scientific-product', 'brand', 'sparepart-consumable', 'accessory', 'standard', 'software-application') AND ((hQyqZ_posts.post_status = 'publish' OR hQyqZ_posts.post_status = 'private')) ORDER BY hQyqZ_posts.post_date DESC LIMIT 0, 12
As you can see when Blocks is active as we do not have any official integration with searchWP plugin it just skip the searchWP mechanism that builds the relevance query.
As shared Toolset offers search integration with Relevanssi plugin but not with searchWP plugin.
- https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/
Its your choice now if you want to go with searchWP, then you should skip search result archive you build using Toolset or you can build search result archive using Toolset then you may go with Relevanssi plugin that is officially integrated with Toolset.
Hi,
SearchWP support replied the following: "If the Toolset archive is used and the results from SearchWP are not appearing, that means that Toolset is overriding the main WordPress query and is running a custom query on the search results page."
Please help me to understand. Does the Toolset block modify the WordPress query with Relevanssi plugin query? To me this must be an option and not obligatory.
If it isn't possible to have the SearchWP within a Toolset block, I could use the default search page. However, in that case, you should address the incompatibility with the Astra theme that I explained in my second reply. Is there any solution to this problem?
Please help me to understand. Does the Toolset block modify the WordPress query with Relevanssi plugin query? To me this must be an option and not obligatory.
==>
We have official integration with Relevanssi that is why it will work and we will just divert the search query to Relevanssi. But with searchWP as that plugin is not compatible or integrated with Toolset, it will bypass the searchWP query. There is not much I can do with that.
If it isn't possible to have the SearchWP within a Toolset block, I could use the default search page. However, in that case, you should address the incompatibility with the Astra theme that I explained in my second reply. Is there any solution to this problem?
==>
Ok. I found that the issue is not a Toolset but the child theme you are using. I just switch to the parent theme and I can see the three Column layout works as expected even when Toolset Blocks plugin is active.
-- hidden link
When I check and I see that there is a class namely "ast-plain-container" added to body tag in parent theme when I load the archive and the same class is missing with the child theme. As soon as you will add the class ast-plain-container to archive body tag of your child theme it should be resolved and you will see the three column layout.
Thank you, I understood the cause. However, the same happens when the toolset blocks plugin is deactivated. This is what initially told me the Astra support, and I also confirmed it. And this makes sense. The child theme hasn't any functionality apart from a few functions that haven't anything to do with classes in the body. So, somehow the toolset blocks plugin removes the class. Could you check it further?
We do not debug child themes and such compatibility issue even if escalated takes years to fix and there will be no ETA on it.
You may try to add the class using JS, for example:
jQuery(document).ready(function() { jQuery('body').addClass('ast-plain-container'); });