Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5250

Column ambiguously defined for report query in new plugin version (2014041800)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • 2.6.4, 2.7.1
    • Module: Certificate
    • None
    • 2014041800
    • Oracle
    • MOODLE_26_STABLE, MOODLE_27_STABLE

      After upgrading to the latest version of mod_certificate (2014041800) we are now experiencing a new ORA-00918 error, after CONTRIB-4067 was fixed. It looks like this is a regression caused by CONTRIB-4067.

      The error appears while trying to pull up the certificate report.

      Error reading from database

      Debug info: ORA-00960: ambiguous column naming in select list
      SELECT *
      FROM (SELECT u.id, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.id,u.picture,u.firstname,u.lastname,u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.imagealt,u.email, ci.code, ci.timecreated
      FROM m_user u
      INNER JOIN m_certificate_issues ci
      ON u.id = ci.userid
      WHERE u.deleted = 0
      AND ci.certificateid = :o_certificateid AND NOT u.id IN (:o_cert7,:o_cert8,:o_cert9,:o_cert10,:o_cert11,:o_cert12,:o_cert13,:o_cert14)

      ORDER BY MOODLELIB.UNDO_MEGA_HACK(MOODLELIB.TRICONCAT(firstname, 'OCISP', lastname)) )
      WHERE rownum <= :o_oracle_num_rows
      [array (
      'o_certificateid' => '763',
      'o_cert7' => 511,
      'o_cert8' => 282,
      'o_cert9' => 22,
      'o_cert10' => 281,
      'o_cert11' => 81,
      'o_cert12' => 103,
      'o_cert13' => 101,
      'o_cert14' => 6,
      'o_oracle_num_rows' => 30,
      )]
      Error code: dmlreadexception
      Stack trace:

      line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 271 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
      line 1122 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      line 740 of /mod/certificate/lib.php: call to oci_native_moodle_database->get_records_sql()
      line 102 of /mod/certificate/report.php: call to certificate_get_issues()

            markn Mark Nelson
            icefresh Mike
            Mike Mike
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.