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

Cron DB error on postgres : column "co.id" must appear in the GROUP BY clause or be used in an aggregate function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker Blocker
    • None
    • 2.0.2
    • Administration
    • PostgreSQL
    • MOODLE_20_STABLE

      during first web run of cron after fresh 2.0.2 install (after some mbz course restores and a borked restore (Films from mooch), which shouldn't have anything to do with this.)


      Running clean-up tasks...
      Deleted old cache_text records
      checking for create_password
      !!! Error reading from database !!!
      !! ERROR: column "co.id" must appear in the GROUP BY clause or be used in an aggregate function
      LINE 1: SELECT ta.tagid, tb.tagid AS correlation, co.id AS correlati...
      ^
      SELECT ta.tagid, tb.tagid AS correlation, co.id AS correlationid, co.correlatedtags
      FROM mdl_tag_instance ta
      LEFT JOIN mdl_tag_instance tb
      ON (ta.itemtype = tb.itemtype AND ta.itemid = tb.itemid AND ta.tagid <> tb.tagid)
      LEFT JOIN mdl_tag_correlation co
      ON co.tagid = ta.tagid
      WHERE tb.tagid IS NOT NULL
      GROUP BY ta.tagid, tb.tagid
      HAVING COUNT > $1
      ORDER BY ta.tagid ASC, COUNT DESC, tb.tagid ASC
      [array (
      0 => 2,
      )] !!
      !! Stack trace: * line 391 of /lib/dml/moodle_database.php: dml_read_exception thrown

      • line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      • line 634 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      • line 844 of /tag/lib.php: call to pgsql_native_moodle_database->get_recordset_sql()
      • line 910 of /tag/lib.php: call to tag_compute_correlations()
      • line 310 of /lib/cronlib.php: call to tag_cron()
      • line 79 of /admin/cron.php: call to cron_run()
        !!

            stronk7 Eloy Lafuente (stronk7)
            nebgor Aparup Banerjee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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