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

Advanced Forum ORA-00904 "HP"."MODIFIED": invalid identifier

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • 3.1.5
    • Module: Advanced forum
    • None
    • 3.1.3 (2016121300)
    • MOODLE_31_STABLE

      With the query at line 323 for render.php at commit 8065f2c:

      $sql = "SELECT $fields, hp.max, hp.modified
                          FROM {user} u
                          JOIN (
                              SELECT userid, max(modified) as max
                              FROM {hsuforum_posts}
                              WHERE privatereply = 0 AND discussion = ?
                              GROUP BY userid
                          ) hp ON hp.userid = u.id
                          ORDER BY hp.max DESC";
      

      the inner select needs the modified field which also needs to be added to the group by clause:

      $sql = "SELECT $fields, hp.max, hp.modified
                          FROM {user} u
                          JOIN (
                              SELECT userid, max(modified) as max, modified
                              FROM {hsuforum_posts}
                              WHERE privatereply = 0 AND discussion = ?
                              GROUP BY userid, modified
                          ) hp ON hp.userid = u.id
                          ORDER BY hp.max DESC";
      

            aolley Adam Olley
            rbon Ray Bon
            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.