I have noticed an error message when adding or updating a post to the site news. The message was:
ERROR: invalid input syntax for integer: "Object id #246"
SELECT type FROM mdl_forum WHERE id = 'Object id #246'
IMHO there is a bug in the mod/forum/post.php. I have patched it as follows:
$ cvs diff post.php
Index: post.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/forum/post.php,v
retrieving revision 1.94.2.6
diff -c -r1.94.2.6 post.php
-
-
- post.php 31 Jul 2006 10:04:18 -0000 1.94.2.6
- post.php 11 Sep 2006 15:01:51 -0000
***************
- 136,142 ****
-
$message = '';
! if (get_field('forum', 'type', 'id', $forum) == 'news' && !$oldpost->parent) {
$updatediscussion = new object;
$updatediscussion->id = $oldpost->discussion;
if (empty($post->timestartdisabled)) {
— 136,142 ----
$message = '';
! if (get_field('forum', 'type', 'id', $forum->id) == 'news' && !$oldpost->parent) {
$updatediscussion = new object;
$updatediscussion->id = $oldpost->discussion;
if (empty($post->timestartdisabled))
$newstopic = false;
! if (get_field('forum', 'type', 'id', $forum) == 'news')
if ($newstopic && empty($post->timestartdisabled)) { --- 274,280 ---- }
$newstopic = false;
! if (get_field('forum', 'type', 'id', $forum->id) == 'news') { $newstopic = true; }
if ($newstopic && empty($post->timestartdisabled)) {