Moodle

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker 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.

Activity

Hide
Patrick Pollet added a comment -

error also preseent in search/documents/physical_htm.php

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

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

Show
Patrick Pollet added a comment - error also preseent in search/documents/physical_htm.php diff -r -b -B --exclude=tags ./search/documents/physical_htm.php /root/web/moodle.195/search/documents/physical_htm.php 59c59 <         $text = shorten($text, $CFG->block_search_limit_index_body); — >         $text = shorten_text($text, $CFG->block_search_limit_index_body);

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: