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

Site registration fails with Postgresql SQL problem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3.1
    • Fix Version/s: None
    • Component/s: Administration
    • Labels:
      None
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      As admin of a Moodle instance, click on Site Administratiotion, then Registration, this spits out a error message, the registration fails and gives the following error message:

       
      Error reading from database
       
      More information about this error
       
      Debug info: FEHLER: Unteranfrage in FROM muss Aliasnamen erhalten -> English ~ "Error: Sub-query in FROM must have a alias name"
      LINE 1: SELECT COUNT(*) FROM (
       ^
      HINT: Zum Beispiel FROM (SELECT ...) [AS] xyz.
      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 <> $1
       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 239 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
       •line 708 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
       •line 1346 of /lib/dml/moodle_database.php: call to pgsql_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 4044 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()

      • Prerequisite for full error: developer debugging level on the site.
      • Versions of Moodle used: 2.3.1+ from July 19th and 26th
      • Upgrade vs. clean install? Issue is present on both upgraded (2.2.x) and a fresh clean database
      • Other components: RHEL 6.3 x86-64, PostgreSQL 8.4.12 (stock RHEL), PHP: 5.3.15 (via "les RPM de Remi"), Apache 2.2.15 (stock RHEL)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rajeshtaneja Rajesh Taneja
              Reporter:
              matsimon Mat Simon
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: