HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Search results appear twice

When the Q&A plugin is enabled, any search result is showed twice. When the Q&A is disabled, the search function doesn't have this issue.

Is there a way to have the Q&A plugin enabled and get the search function to behave as expected?


This behavior happened with RC2 and also with 2021.011.

Comments

  • weasel527weasel527 New
    edited March 2022

    I can confirm this is an issue. All of my search results are duplicated regardless of what I search for, and only when the Q&A plugin is enabled.

  • This is a janky temporary solution for version 2021.009 till the underlying problem (which I can't find) can be solved:

    Add the following code snippet to the end of the __construct function of library/Vanilla/Search/SearchResults.php:

    for($x = ($totalCount+1)/2; $x <= $totalCount; $x++) {

        $this->removeResultItem(1);

    }

    And remove or hide the "What to Search" checkboxes for filtering by Discussion and/or Question (which don't work anyway).

Sign In or Register to comment.