Plugin Issue on Pro theme

I’m using a Plugin called “WP Broadbean” and “WP Broadbean Search” and run into an issue where I the search function on this seems to have an issue when using the salary field showing no results. All other fields work fine. And when troubleshooting the issue seems to be resolved switching theme to default theme. So get in the weird zone where the plugin developer isn’t providing support since the theme seems to be conflicting with it.

Below is an example of the search string incase that helps with ideas of the conflict
https://hosting.quentosity.co.nz/~encorenzco/?post_type=wpbb_job&s=&wpbb_job_location=0&wpbb_job_skill=0&wpbb_job_type=0&wpbb_job_industry=0&_wpbb_job_salary=1000

Also below is a WP error that occurs when this error occurs.

[16-Mar-2020 18:40:53 UTC] WordPress database error Not unique table/alias: ‘wpsc_postmeta’ for query SELECT SQL_CALC_FOUND_ROWS DISTINCT wpsc_posts.ID FROM wpsc_posts INNER JOIN wpsc_postmeta ON ( wpsc_posts.ID = wpsc_postmeta.post_id ) LEFT JOIN wpsc_postmeta ON wpsc_posts.ID = wpsc_postmeta.post_id WHERE 1=1 AND (
( wpsc_postmeta.meta_key = ‘_wpbb_job_salary’ AND CAST(wpsc_postmeta.meta_value AS SIGNED) > ‘1000’ )
) AND wpsc_posts.post_type = ‘wpbb_job’ AND (wpsc_posts.post_status = ‘publish’ OR wpsc_posts.post_status = ‘acf-disabled’) GROUP BY wpsc_posts.ID ORDER BY wpsc_posts.post_date DESC LIMIT 0, 10 made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts

Hopefully everything makes sense and you are able to help thanks. I can provide login details to the site and email of the plugin developer if that helps just let me know forgot how to make the hidden text only for privileged users to see.

Hi Quentin,

We are sorry you are having this issue. We can check, unfortunately, we can’t promise a fixed. As much as we want to be compatible with all other plugins out there, there’s a lot of those that we cannot cater. Only these plugins are the included on our scope of support. Please try to provide credentials inside a secure note.

Thanks I have added login info as secure note to initial comment. I understand this is grey area for both theme and plugin support. But if I get more info even on issue on possibly how to solve then could take back to plugin developer to solve.

Feel free to switch to default theme to see it working. This is on staging site so it is fine. Url to use if staging site is the below since default theme doesn’t support shortcode in header.
https://hosting.quentosity.co.nz/~encorenzco/test-search/

Thanks again for your support even looking into this anymore insight on the issue would be helpful.

Hi Quentin,

Just to make sure that we are on the same page, conflict with 3rd party plugins is outside of our support scope and something that you need to follow up with the plugin developer. I do understand that in such cases both parties do not cooperate but it is indeed impossible for us to support all plugins in the WordPress world.

I spent a lot of time debugging and see why this is happening. The first obstacle was the view of the form when Pro was active.

I found out that there are bunch of CSS code in Pro > Theme Options > CSS which caused teh problem. I removed the code temporarily and all form fields showed correctly.

Then I tested with not touching any option except the salary to 2000. The result where different while checking with Pro and Twenty-Twenty.

I checked the error that you shared and it shows there is a bad table name error in the SQL code or there is a duplicate. I am not sure as we do not have tables added to WordPress database starting with wpbb like the plugin.

Finally, I found a point that causes the issue but again I am not sure why and how to fix. If you do the search, result page contains series of arguments in URL as the form is passed using GET method. The result was this in the browser address bar:

?post_type=wpbb_job&wpbb_job_industry=0&wpbb_job_location=0&wpbb_job_type=0&wpbb_job_skill=0&_wpbb_job_salary=2000&s=

The odd thing about the items was that every option started with wpbb after & except the salary one which started with _wpbb.

I removed that additional _ and reloaded the page and I have got the correct result with Pro.

So, there is something that causes the addition of _ for the salary field which I am not sure what it is and why. But at least I think this will be a good starting point for you to debug and troubleshoot the problem.

Unfortunately, this is the most that we can do at this stage and you can give the information to the plugin developer to follow up.

Thank you.

1 Like

Thanks Plugin developer has the question. Below are you able to answer that thanks. As now he is working more on it as the underscore part removing just means it doesn’t filter.

Is there anything in your theme that is using the pre_get_posts WordPress hook?

Hello Quentin,

Yes, there is existing pre_get_posts hook used for WPML integration which you can find in;

\cornerstone\includes\classes\components\class-wpml.php

Hope this helps.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.