Forum OpenACS Q&A: Response to BBoard, cr_repository, SWS

Collapse
Posted by Peter Vessenes on
Okay, we just seem to have fixed this. Here's what needs to be done.
  • First, fix all your old messages. This update will work, provided you don't use acs_messages for anything other than bboards.
    update acs_contents 
    set searchable_p = 'f' 
    where content_id in 
       (select content_id from acs_contents, 
        bboard_forum_message_map, 
        cr_items, 
        acs_objects o 
        where content_id = live_revision 
          and item_id    = message_id(+) 
          and message_id is null 
          and o.object_id = item_id 
          and o.object_type = 'acs_message');
    
  • Second, update the following two scripts:
    1. tcl/bboard-procs.tcl, in the bboard_alert_one_msg proc. Add this query after the e-mail message is created.
              db_dml message_non_searchable {
      	update acs_contents set searchable_p = 'f'
      	where content_id = (select live_revision from cr_items where item_id = :email_mesg_id)
          }
      
    2. www/message-mail-2.tcl, in the db_transaction. Add this query after the new message is created.
          # set this puppy to not searchable
          db_dml message_non_searchable {
      	update acs_contents set searchable_p = 'f'
      	where content_id = (select live_revision from cr_items where item_id = :message_id)
          }
      
I couldn't tell if the message-mail scripts are used in the default distribution (they let a user mail a post to someone), but for completeness, we added that query. #2 hasn't been tested. #1 is running just fine right now on Oracle 9i/Linux. I gotta agree with Don, this is a terrible kludge.