Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.11, 2.4.8, 2.5.4, 2.6, 2.7
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
-
MOODLE_25_STABLE, MOODLE_26_STABLE
-
wip-MDL44021
-
Description
See this discussion: https://moodle.org/mod/forum/discuss.php?d=253609
1.- In a Glossary Search box, enter 2 words. You get this error:
ERROR: duplicate parameter name in query
Debug info:
Error code: duplicateparaminsql
Stack trace:
line 868 of \lib\dml\moodle_database.php: dml_exception thrown
line 991 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params()
line 1415 of \lib\dml\moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1488 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql()
line 1659 of \lib\dml\moodle_database.php: call to moodle_database->get_field_sql()
line 270 of \mod\glossary\sql.php: call to moodle_database->count_records_sql()
line 378 of \mod\glossary\view.php: call to require()
2.- In a Glossary Search box, enter 3 words. You get this error:
ERROR: Incorrect number of query parameters. Expected 9, got 8.
This used to work in Moodle 1.9. It seems that the Search function has been entirely re-written in Moodle 2, but it was never properly tested!
This is really bad and ought to be fixed in all Moodle 2 versions ASAP.