-
Bug
-
Resolution: Fixed
-
Blocker
-
1.9.6
-
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.