Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-55954

Setting invalid index name for global search displays warnings

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Debug developer mode on

      1. Setup global search and solr with a correct host, port and indexname (no need to index your site contents)
      2. Go to admin/settings.php?section=manageglobalsearch, "3. Setup search engine" should be green
      3. Open admin/settings.php?section=searchsolr in a new tab and change hostname, indexname and port to wrong values checking admin/settings.php?section=manageglobalsearch in the meanwhile
      4. If there are wrong values you should see a red "The search engine is not available. Please contact your administrator." message. You should also see a debugging message with the exact error, probably a Solr HTTP Error 7: 'Couldn't connect to server', Unsuccessful system request : Response Code 404. or something like that.
      Show
      Debug developer mode on Setup global search and solr with a correct host, port and indexname (no need to index your site contents) Go to admin/settings.php?section=manageglobalsearch, "3. Setup search engine" should be green Open admin/settings.php?section=searchsolr in a new tab and change hostname, indexname and port to wrong values checking admin/settings.php?section=manageglobalsearch in the meanwhile If there are wrong values you should see a red "The search engine is not available. Please contact your administrator." message. You should also see a debugging message with the exact error, probably a Solr HTTP Error 7: 'Couldn't connect to server' , Unsuccessful system request : Response Code 404. or something like that.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-55954_master

      Description

      Solr version: 5.5.2
      PHP version: 5.6.25

      1. Turn on global search.
      2. Start a solr server.
      3. Visit 'Site administration' > 'Plugins' > 'Search' > 'Solr' and enter an invalid index name.
      4. Visit 'Site administration' > 'Plugins' > 'Search' > 'Manage global search'.
      5. Notice that you get the following warnings similar to -
        1. Warning: SolrClient::system(): Entity: line 10: parser error : Opening and ending tag mismatch: hr line 8 and body in /home/markn/mstorage/i31/moodle/search/engine/solr/classes/engine.php on line 1118
        2. Warning: SolrClient::system(): </body> in /home/markn/mstorage/i31/moodle/search/engine/solr/classes/engine.php on line 1118

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Nov/16