I get this error when i try to merge support ticket - tried both beta og dev release.
I looks like something has changed in the comment module in drupal 7 - this 'comment' filed is no longer in the table comment, but is now a field.
please look into this :o)
•Notice: Undefined property: stdClass::$homepage in _support_node_move() (line 1404 of /home/www/mysite.com/sites/all/modules/support/support.module).
•Notice: Array to string conversion in DatabaseStatementBase->execute() (line 2135 of /home/www/mysite.com/includes/database/database.inc).
•PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'comment' in 'field list': INSERT INTO {comment} (nid, pid, uid, subject, comment, format, hostname, timestamp, status, thread, name, mail, homepage) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4_und, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => 0 [:db_insert_placeholder_2] => 1 [:db_insert_placeholder_3] => demo22 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 90.184.52.25 [:db_insert_placeholder_7] => 1320873472 [:db_insert_placeholder_8] => 0 [:db_insert_placeholder_9] => 01/ [:db_insert_placeholder_10] => admin [:db_insert_placeholder_11] => tisbris@gmail.com [:db_insert_placeholder_12] => [:db_insert_placeholder_4_und] => Array ( [0] => Array ( [summary] => [value] => demo22 [format] => filtered_html ) ) ) in _support_node_move() (line 1406 of /home/www/mysite.com/sites/all/modules/support/support.module).
// Move the ticket, making it an update on another ticket.
$max = db_query('SELECT MAX(thread) FROM {comment} WHERE nid = :nid', array(':nid' => $destination->nid))->fetchField();
// Strip the "/" from the end of the thread.
$max = rtrim($max, '/');
// Finally, build the thread field for this new comment.
$thread = int2vancode(vancode2int($max) + 1) . '/';
$account = user_load($node->uid);
$id = db_insert('comment')
->fields(array(
'nid' => $destination->nid,
'pid' => 0,
'uid' => $node->uid,
'subject' => $node->title,
'comment' => $node->body,
'format' => 1,
'hostname' => ip_address(),
'timestamp' => $node->changed,
'status' => 0,
'thread' => $thread,
'name' => $account->name,
'mail' => $account->mail,
'homepage' => $account->homepage,
))
->execute();
// Tell the other modules a new comment has been submitted.
$comment = array();
$comment['cid'] = db_last_insert_id('comments', 'cid');
$comment['subject'] = $node->title;
$comment['comment'] = $node->body;
$comment['nid'] = $destination->nid;
$comment['uid'] = $account->uid;
$comment['message_id'] = db_query('SELECT message_id FROM {support_ticket} WHERE nid = :nid', array(':nid' => $node->nid))->fetchField();
$comment['support_email'] = TRUE;
$comment['notification'] = db_query('SELECT 1 FROM {support_assigned} WHERE nid = :nid AND uid = :uid', array(':nid' => $destination->nid, ':uid' => $account->uid))->fetchField();
// Preserve the existing values for the support ticket status.
$comment['state'] = $destination->state;
$comment['priority'] = $destination->priority;
$comment['client'] = $destination->client;
$comment['assigned'] = $destination->assigned;
comment_invoke_comment($comment, 'insert');
PS. It would be great if this merge option is moved to the overview and the be able to do a mass merge to a single ticket, just like the mass update option.
Comments
Comment #1
tisbris commentedis this only that have this issue?
please let me know if you cannot reproduce this.
thx
Comment #2
jeremy commentedFixed:
http://drupalcode.org/project/support.git/commit/59699c8