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

Site registration page fails on MySQL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 2.3.1
    • Fix Version/s: None
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      Test pre-requisites

      • To be tested on the 4 different DB engines

      Test

      1. Go to the site registration page
      2. Make sure the form to register appear and no errors/exceptions are thrown/raised
      Show
      Test pre-requisites To be tested on the 4 different DB engines Test Go to the site registration page Make sure the form to register appear and no errors/exceptions are thrown/raised
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      1. Use a non Oracle instance of Moodle
      2. Go to the site registration page
      3. An exception is raised

      Debug info: Every derived table must have its own alias
      SELECT COUNT(*) FROM (
      SELECT DISTINCT ue.userid, e.courseid
      FROM mdl_user_enrolments ue, mdl_enrol e, mdl_course c
      WHERE ue.enrolid = e.id
      AND e.courseid <> ?
      AND c.id = e.courseid
      AND c.visible = 1)
      [array (
      0 => '1',
      )]
      Error code: dmlreadexception
      Stack trace:
       
          line 407 of /lib/dml/moodle_database.php: dml_read_exception thrown
          line 948 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
          line 1346 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
          line 1419 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
          line 1590 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
          line 4043 of /course/lib.php: call to moodle_database->count_records_sql()
          line 373 of /admin/registration/forms.php: call to average_number_of_participants()
          line 194 of /lib/formslib.php: call to site_registration_form->definition()
          line 61 of /admin/registration/register.php: call to moodleform->moodleform()

      This is a regression caused by MDL-34072

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rajeshtaneja Rajesh Taneja
              Reporter:
              fred Frédéric Massart
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: