Forum OpenACS Q&A: Response to Payroll Function for Employees in Intranet Module

Thanks Don for the quick response, I've turned verbose on and then
executed the same attempt to edit "payroll" information, the log says
this is what happened: (sorry for the mass log, I haven't figured out
how to paste in a text piece without losing the formatting)...

10.104.168.141 - - [23/May/2001:13:27:13 -0400] "GET
/intranet/employees/payroll.tcl?user_id=3&return_url=%2fintranet%2femployees%2fadmin%2fview%2etcl%3fuser%5fid%3d3
HTTP/1.1" 200 1391
"http://10.104.168.60:8000/intranet/employees/admin/view.tcl?user_id=3"
"Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)"
[23/May/2001:13:27:19][9989.4101][-conn0-] Notice: Querying 'select
case when ad_group_member_p(3, 11) = 't' or  ad_group_member_p(3, 8) =
't' then 1 else 0 end;'
[23/May/2001:13:27:19][9989.4101][-conn0-] Notice: dbinit:
sql(localhost::acs): 'select case when ad_group_member_p(3, 11) = 't'
or  ad_group_member_p(3, 8) = 't' then 1 else 0 end'
[23/May/2001:13:27:19][9989.4101][-conn0-] Notice: Querying '
select
  u.first_names,
  u.last_name,
  u.email,
  (sysdate() - info.first_experience::timestamp)/365 as years_experience,
  info.*
from users u, im_employee_info_view info
where u.user_id = 3
and u.user_id = info.user_id
and ad_group_member_p ( u.user_id, 8 ) = 't'
union
select
  u.first_names,
  u.last_name,
  u.email,
  0::interval as years_experience,
  info.*
from users u, im_employee_info_null info
where u.user_id = 3
and not exists (select 1 from im_employee_info i
                where u.user_id = i.user_id)
and ad_group_member_p ( u.user_id, 8 ) = 't';'
[23/May/2001:13:27:19][9989.4101][-conn0-] Error: Ns_PgExec: result
status: 7 message: ERROR:  Bad interval external representation '0'

[23/May/2001:13:27:19][9989.4101][-conn0-] Error: dbinit:
error(localhost::acs,ERROR:  Bad interval external representation '0'
): '
select
  u.first_names,
  u.last_name,
  u.email,
  (sysdate() - info.first_experience::timestamp)/365 as years_experience,
  info.*
from users u, im_employee_info_view info
where u.user_id = 3
and u.user_id = info.user_id
and ad_group_member_p ( u.user_id, 8 ) = 't'
union
select
  u.first_names,
  u.last_name,
  u.email,
  0::interval as years_experience,
  info.*
from users u, im_employee_info_null info
where u.user_id = 3
and not exists (select 1 from im_employee_info i
                where u.user_id = i.user_id)
and ad_group_member_p ( u.user_id, 8 ) = 't''
[23/May/2001:13:27:19][9989.4101][-conn0-] Error: Database operation
"0or1row" failed (exception NSDB, "Query was not a statement returning
rows.")
Database operation "0or1row" failed (exception NSDB, "Query was not a
statement returning rows.")
    while executing
"ns_db 0or1row $db "
select
  u.first_names,
  u.last_name,
  u.email,
  (sysdate() - info.first_experience::timestamp)/365 as years_experience,
  ..."
    invoked from within
"set selection [ns_db 0or1row $db "
select
  u.first_names,
  u.last_name,
  u.email,
  (sysdate() - info.first_experience::timestamp)/365 as years..."
    (file
"/var/lib/aolserver/servers/defaultacs/www/intranet/employees/payroll-edit.tcl"
line 47)
    invoked from within
"source $script"
    (procedure "ns_sourceproc" line 6)
    invoked from within
"ns_sourceproc cns5 {}"
[23/May/2001:13:27:19][9989.4101][-conn0-] Notice: Querying 'select *
from referer_log_glob_patterns;'
[23/May/2001:13:27:19][9989.4101][-conn0-] Notice: dbinit:
sql(localhost::acs): 'select * from referer_log_glob_patterns'
[23/May/2001:13:27:19][9989.4101][-conn0-] Notice: Querying 'update
referer_log set click_count = click_count + 1
where local_url = '/intranet/employees/payroll-edit.tcl'
and foreign_url =
'http://10.104.168.60:8000/intranet/employees/payroll.tcl?user_id=3&return_url=%2fintranet%2femployees%2fadmin%2fview%2etcl%3fuser%5fid%3d3';
and trunc(entry_date) = trunc(sysdate());'
[23/May/2001:13:27:19][9989.4101][-conn0-] Notice: dbinit:
sql(localhost::acs): 'update referer_log set click_count = click_count + 1
where local_url = '/intranet/employees/payroll-edit.tcl'
and foreign_url =
'http://10.104.168.60:8000/intranet/employees/payroll.tcl?user_id=3&return_url=%2fintranet%2femployees%2fadmin%2fview%2etcl%3fuser%5fid%3d3';
and trunc(entry_date) = trunc(sysdate())'
10.104.168.141 - - [23/May/2001:13:27:19 -0400] "GET
/intranet/employees/payroll-edit.tcl?user_id=3&return_url=%2fintranet%2femployees%2fadmin%2fview%2etcl%3fuser%5fid%3d3
HTTP/1.1" 500 530
"http://10.104.168.60:8000/intranet/employees/payroll.tcl?user_id=3&return_url=%2fintranet%2femployees%2fadmin%2fview%2etcl%3fuser%5fid%3d3"
"Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)"

Sorry for the long log piece, but I'm not sure what is important and
what's not...Also in the employee's subdirectory of the intranet
module there are some "history-edit.tcl" files, but I don't see a link
to them from any admin page. Tomorrow when I have time I may try
executing them to see what happens...

Thanks,