We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36704
    • 131 Posts
    Hi there is there any one of you successfully setup and RUN the Discuss and use SEARCH?
    I have a problem on search, it's give me zero results every time im using the search.
    Is there anything to configure on system settings?

    Thanks smiley
      • 15114
      • 102 Posts
      Hi

      I have exactly the same problem.


      Julien
        • 36704
        • 131 Posts
        Hi julien,
        Let us hope that someone will help to our problem on discuss.
        How did you setup your MODx Discuss? Live or Local Server?

        Quote from: alyainec at May 09, 2013, 03:23 PM
        Hi there is there any one of you successfully setup and RUN the Discuss and use SEARCH?
        I have a problem on search, it's give me zero results every time im using the search.
        Is there anything to configure on system settings?

        Thanks smiley
          • 37110
          • 72 Posts
          I have the same problem.
          I've changed 2 files and it worked.

          core/components/discuss/model/discuss/search/dissearch.class.php
          From:
          if (!empty($conditions['board'])) $c->where(array('Board.id' => $conditions['board']));
          To:
          if (!empty($conditions['board'])) $c->where(array('Board.id:IN' => $conditions['board']));


          core/components/discuss/controllers/web/search.class.php
          From:
          $conditions = array();
          if (!empty($this->scriptProperties['board'])) {
          $conditions['board'] = array($this->scriptProperties['board']);
          } else {
          $boards = $this->modx->call('disBoard','fetchList',array(&$this->modx));
          $c = array();
          foreach ($boards as $board) {
          $c[] = $board['id'];
          }
          $c = implode(' OR ',$c);
          $conditions['board'] = '('.$c.')';
          }
          To:
          $conditions = array();

          if (!empty($this->scriptProperties['board']) && $this->scriptProperties['board'] != '(All Boards)') {
          $conditions['board'] = $this->scriptProperties['board'];
          } else {
          $boards = $this->modx->call('disBoard','fetchList',array(&$this->modx));
          $c = array();
          foreach ($boards as $board) {
          $c[] = $board['id'];
          }
          $conditions['board'] = $c;
          }
          [ed. note: wiegers last edited this post 10 years, 10 months ago.]
            • 36704
            • 131 Posts
            Hi wiegers,
            I just followed your instruction for modifying some line on the code and it's worked!
            Im glad you found the solution. May be on the next release of discuss will fix the problem as what you did.

            Thank you very much for your help ;-)
              • 37110
              • 72 Posts
              Hi alyainec,

              I'm glad i could help you.
              I will make a pull request at Github so it will be fixed the next release.

                • 37012
                • 32 Posts
                Worked for me too. Thanks much!
                  • 42602
                  • 81 Posts
                  This has been fixed in the latest release Discuss 1.2. It is pending to approval to package manager right now. Or hardly can say that it is fixed, the whole search has been improved in terms of speed and all filters from default theme should work. Or at least they worked when last tried.

                  Also it has Sphinx integration for search, will create documentation to RTFM in near future when I get access to it.