Support Forum

Topic Status Search Not Working

RE rebeccagill
rebeccagill
Member

We’re having problems with the topic status search not showing any actual results when we click on the status link. It used to work correctly. Then a couple updates ago it stopped producing any results.

On our main forums we have three topic statuses we’ve added: New, Open/Answered, and Closed. As admins we use it mainly to make sure we don’t miss responding to any of the New forum topics. 

Normally this URL for the New topic status should produce a handful of results when we click on it.

http://www.web-savvy-marketing.com/forum/?forum=all&set=16&value=1&type=10&include=0&search=1&new=1

But lately it always returns “There were no topics found.”

Likewise there should be thousands of Closed topics but this search for those also always returns “There were no topics found” as well.

http://www.web-savvy-marketing.com/forum/?forum=all&set=16&value=3&type=10&include=0&search=1&new=1

Is there a setting for this that changed a while back that we missed? Or is there something wrong with our install that it stopped working like it did before?

Our site is currently running WordPress 4.1, SimplePress 5.5.3, Topic Status 1.2.10. If we can get this topic status search thing sorted before we update the plugins that would be helpful to us.

4 Answers

New Answer

IK Ike
Ike
Member

Hey rebeccagill,

I’ve just tried this locally and am having the same problem. The search code has recently undergone some work so we will need to take a look, hopefully sometime over the next day or two.

MP Mr Papa
Mr Papa
Member

yup… looks broke… will get it fixed up in next release… 

easy fix if you want to make in the interim on your site…  if so, open up forum-plugins/sp-topicstatus-plugin.php…  around line 306, you will see this:

# ----------------------------------------------
# Search filters
# ----------------------------------------------
function sp_topicstatus_search_join($spdb, $term, $type, $include) {
    if($type == 10) {
        $spdb->join[] = SFFORUMS.' ON '.SFTOPICS.'.forum_id = '.SFFORUMS.'.forum_id';
    }
    return $spdb;
}

if you change it to:

# ----------------------------------------------
# Search filters
# ----------------------------------------------
function sp_topicstatus_search_join($spdb, $term, $type, $include) {
    if ($type == 10) {
        $spdb->join[] = SFFORUMS.' ON '.SFTOPICS.'.forum_id = '.SFFORUMS.'.forum_id';
        $spdb->fields = SFTOPICS.'.topic_id';
        $spdb->orderby = SFTOPICS.'.topic_id';
    }
    return $spdb;
}

all should be good…  sorry for the issue…

RE rebeccagill
rebeccagill
Member

Yep. That code change does in fact resolve the issue for us.

Thanks so much for the fast turn around on answering our question and resolving the issue!

YS Yellow Swordfish
Yellow Swordfish
Member

You’re welcome, Glad it worked OK and thanks for the confirmation.