Index: openacs-4/packages/forums/tcl/messages-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/messages-procs.tcl,v diff -u -r1.59.2.13 -r1.59.2.14 --- openacs-4/packages/forums/tcl/messages-procs.tcl 7 Jan 2020 13:28:23 -0000 1.59.2.13 +++ openacs-4/packages/forums/tcl/messages-procs.tcl 4 Feb 2020 10:24:02 -0000 1.59.2.14 @@ -238,7 +238,7 @@ set attachments_sql [expr {[ad_conn isconnected] && [forum::attachments_enabled_p] ? { (select count(*) from attachments - where object_id = message_id) as n_attachments, + where object_id = m.message_id) as n_attachments, } : ""}] set sql [subst -nocommands {