Forum .LRN Q&A: Response to problem when posting to a forum

Collapse
Posted by Deds Castillo on
Arjun,

I now see why I still can't post. It's because when forum::message::new is called, posting_date defaults to an empty string which gets passed to the pl/sql proc which sees that posting date is not null because it contains an empty string and tries to insert that.

My temporary fix is to change the following line in forums/tcl/message-procs.tcl

 
oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {forum_id 
message_id parent_id subject content html_p user_id posting_date}  

to...

if {[empty_string_p $posting_date]} { 
    oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {forum_id 
message_id parent_id subject content html_p user_id}
} else { 
    oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {forum_id 
message_id parent_id subject content html_p user_id posting_date}
}