Closed (works as designed)
Project:
Ubercart
Version:
7.x-3.4
Component:
Orders
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 May 2013 at 04:22 UTC
Updated:
1 Jun 2018 at 06:03 UTC
Jump to comment: Most recent
Comments
Comment #1
RAFA3L commentedChanging this in uc_op_order_comments_view_table now recognise the breaklines
$data['comment'] = array(
'#markup' => check_plain($comment->message),
'#cell_attributes' => array('class' => 'message'),
);
to
$data['comment'] = array(
'#markup' => check_markup($comment->message),
'#cell_attributes' => array('class' => 'message'),
);
Now, one step more, how to use CKEditor? I can display de editor changing this...
$form['order_comment_field']['order_comment'] = array(
//'#type' => 'textarea',
'#type' => 'text_format',
'#description' => t('Order comments are used primarily to communicate with the customer.'),
);
But when save the comment I get this error...
PDOException: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1: INSERT INTO {uc_order_comments} (order_id, uid, message, order_status, notified, created) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2_value, :db_insert_placeholder_2_format, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => 56 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_3] => pending [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1369235112 [:db_insert_placeholder_2_value] =>
ads asdads
[:db_insert_placeholder_2_format] => filtered_html ) in uc_order_comment_save() (line 1257 of /Applications/MAMP/htdocs/mysite/sites/all/modules/ubercart/uc_order/uc_order.module).
Comment #2
tr commentedI don't really like the idea of using HTML in order comments - that assumes that the only purpose/use of the comment will be for display on the web. I'd much rather see a solution where the comment is run through a line break filter before being displayed. You don't say *where* you are seeing the issue of text wrapping...
Comment #3
tr commentedNo further information provided.
Comment #4
acdtrp commentedI don't agree that it assumes that the only purpose/use of the comment will be for display on the web - what about e-mail services that are not sophisticated enough to convert hyperlinks? Most of our customers are using crappy Bulgarian web email provider which does (or rather say doesn't) exactly that and all of the links we send in order comment remain unclickable there. What is your solution for this problem?