Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-26607

Error reading from database when attempting a messages advanced search for a person in my courses

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Messages
    • Labels:

      Description

      Attempting a messages advanced search for a person with 'Only in my courses' ticked.

      Error reading from database

      Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM mdl_user u, mc.id as contactlistid, mc.blocked
      ' at line 2
      SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email,
      FROM mdl_user u, mc.id as contactlistid, mc.blocked
      JOIN mdl_role_assignments ra ON ra.userid = u.id
      LEFT JOIN mdl_message_contacts mc
      ON mc.contactid = u.id AND mc.userid = ?
      WHERE u.deleted = '0' AND u.confirmed = '1'
      AND ra.contextid IN (10,3,1)
      AND (LOWER(CONCAT(firstname, ' ', lastname)) LIKE LOWER COLLATE utf8_bin ESCAPE '
      ')

      [array (
      0 => '4',
      1 => '%sally%',
      )]
      Stack trace:

      • line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown
      • line 790 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 1454 of /message/lib.php: call to mysqli_native_moodle_database->get_records_sql()
      • line 979 of /message/lib.php: call to message_search_users()
      • line 615 of /message/lib.php: call to message_print_search_results()
      • line 302 of /message/index.php: call to message_print_search()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    5/May/11