Forum OpenACS Q&A: e-commerce 4.6.1 session_id's

Collapse
Posted by Ben Chan on
When I click to browse a category inside of e-commerce using OACS 5.0.2, I get an error. I'm not sure when the cookie is set for the session_id and when it is placed into ec_user_sessions table (as that doesn't seem to be happening). Can anyone help? Below is the error I got:

Database operation "dml" failed

ERROR:  insert or update on table "ec_user_session_info" violates foreign key constraint "$1"
DETAIL:  Key (user_session_id)=(1) is not present in table "ec_user_sessions".

SQL: 
      insert into ec_user_session_info 
      (user_session_id, category_id)
      values
      ('1', '1')
    
    while executing
"ns_pg_bind dml nsdb0 {
      insert into ec_user_session_info 
      (user_session_id, category_id)
      values
      (:user_session_id, :category_id..."
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
    ("postgresql" arm line 2)
    invoked from within
"switch $driverkey {
                oracle {
                    return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
                }
       ..."