Hallo,
Everybody who gets sql errors on submitting, just change:

/**
 * Implementation of hook_comment
 */
function comment_cck_comment(&$comment, $op) {
  switch ($op) {
    case 'insert':
    case 'update':
	$node = node_load($comment->nid]);
...

to

/**
 * Implementation of hook_comment
 */
function comment_cck_comment(&$comment, $op) {
  switch ($op) {
    case 'insert':
    case 'update':
	$node = node_load($comment[nid]);
...

Hope I could help :)

CommentFileSizeAuthor
#3 comment_cck_update_node_load_1.patch550 bytessamhassell

Comments

amariotti’s picture

I can confirm that this does fix the error. Something this simple kind of makes me feel stupid! Maybe the developer should hear about this...

Thanks!

Ghostthinker’s picture

I thought the developers would at least have gotten a notification about that issue...

samhassell’s picture

Status: Active » Needs review
StatusFileSize
new550 bytes

Thanks Steve On,

I rolled a patch for this. I added apostrophes around nid as I think thats how Drupal likes it.

mitchell’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Fixed

This fix is in the 6.x branch. Please change the status to 'patch (to be ported)' if you would like it applied to 5.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.