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

cron based global search dies with unknown function shorten in ppt, txt ans xml documents

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.9.6
    • Fix Version/s: 1.9.7, 1.9.8, 2.0
    • Component/s: Global search
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      WXhile still seeking why Moodle cron sometimes die (see http://tracker.moodle.org/browse/MDL-17783) we noticed fatal errors when indexing TXT, PPT or XML documents. This was easily tracked by using a "lock file" to block another run if a previous one was still running or has died for some resaons...

      This is due to the fact that the three scripts search/documents/physical_xxx.php call an unkonw function "shorten" whereas it should be "shorten_text"

      diff -r -b -B --exclude=tags ./search/documents/physical_ppt.php /root/web/moodle.195/search/documents/physical_ppt.php
      89c89
      <         $indextext = shorten($text, $CFG->block_search_limit_index_body);

      >         $indextext = shorten_text($text, $CFG->block_search_limit_index_body);
      diff -r -b -B --exclude=tags ./search/documents/physical_txt.php /root/web/moodle.195/search/documents/physical_txt.php
      34c34
      <         $text = shorten($text, $CFG->block_search_limit_index_body);

      >         $text = shorten_text($text, $CFG->block_search_limit_index_body);
      diff -r -b -B --exclude=tags ./search/documents/physical_xml.php /root/web/moodle.195/search/documents/physical_xml.php
      37c37
      <         $text = shorten($text, $CFG->block_search_limit_index_body);

      >         $text = shorten_text($text, $CFG->block_search_limit_index_body);

      Hope this will help ... this is not enough since my crons are still occasionnally dying or running for more that 30 minutes, , but much less frequently ...

      Cheers.

        Attachments

          Activity

            People

            Assignee:
            vf Valery Fremaux
            Reporter:
            ppollet Patrick Pollet
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              25/Nov/09