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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 1.9.7, 1.9.8, 2.0
    • 1.9.6
    • Global search
    • None
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE, MOODLE_20_STABLE

      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.

            vf Valery Fremaux
            ppollet Patrick Pollet (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.