Moodle

SQL errors in cron: > HTML entity in SQL code

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.3
  • Fix Version/s: 1.9.6
  • Component/s: Global search
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

I ran the cron script today as Admin on 1.9.3, and got a bunch of SQL errors, like the following:

... the right syntax to use near 'AND id IN ('')'
SELECT id as docid
FROM mdl_lesson_pages
WHERE timemodified > AND id IN ('')

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Seems to be lesson-related. Addressing to 1.9.4 and assigning to Mark... thanks for report!

Show
Eloy Lafuente (stronk7) added a comment - Seems to be lesson-related. Addressing to 1.9.4 and assigning to Mark... thanks for report!
Hide
Petr Škoda (skodak) added a comment -

looks more like global search issue

Show
Petr Škoda (skodak) added a comment - looks more like global search issue
Hide
Valery Fremaux added a comment -

Nicolas

IMHO the issue does not come from > that is a trace effect, but rather on missing $CFG->search_indexer_update_date entry in config, breaking the UPDATE SQL statements.

Could you check for presence of this date ?

Could u try that fix and tell me ?

search/update.php §56

write :

$indexdate = 0 + @$CFG->search_indexer_update_date;

to protect writing of the SQL statement at line §101

After the cron sequence running search indexer should the config value have changed...

Cheers.

Show
Valery Fremaux added a comment - Nicolas IMHO the issue does not come from > that is a trace effect, but rather on missing $CFG->search_indexer_update_date entry in config, breaking the UPDATE SQL statements. Could you check for presence of this date ? Could u try that fix and tell me ? search/update.php §56 write : $indexdate = 0 + @$CFG->search_indexer_update_date; to protect writing of the SQL statement at line §101 After the cron sequence running search indexer should the config value have changed... Cheers.
Hide
Valery Fremaux added a comment -

Query protection commited in CVS (MOODLE_19_STABLE, HEAD)

Show
Valery Fremaux added a comment - Query protection commited in CVS (MOODLE_19_STABLE, HEAD)

People

Dates

  • Created:
    Updated:
    Resolved: