The fix I describe will work with postgresql 7.2. In forums_meesage__new change in the call to acs_object__new where it says p_context_id to coalesce(p_context_id, p_forum_id)
The data change violation is caused by a bug in postgresql 7.1.