Index: openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl,v diff -u -r1.68.2.18 -r1.68.2.19 --- openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 30 Mar 2021 15:52:11 -0000 1.68.2.18 +++ openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 31 Jan 2022 16:33:58 -0000 1.68.2.19 @@ -212,11 +212,17 @@ set cols(conflict_p) :conflict_db_p # Different logic for update and insert - if { [nsv_exists lang_message_$locale $key] } { + if { [db_0or1row message_exists { + select + -- For use in audit log call + message as old_message + from lang_messages + where locale = :locale + and package_key = :package_key + and message_key = :message_key + }] } { # Update existing message if the message has changed - # For use in audit log call - set old_message [nsv_get lang_message_$locale $key] # Peter TODO: should these attributes be cached? lang::message::get \ -package_key $package_key \ @@ -306,6 +312,10 @@ conflict_p f \ sync_time "" \ ] + + # Cleanup the nsv caching the message + set key "${package_key}.${message_key}" + nsv_unset -nocomplain -- lang_message_$locale $key } ad_proc -private lang::message::undelete {