Forum OpenACS Development: add entry on logger pkg

Collapse
Posted by Iuri Sampaio on
To add entries in logger pkg. the user goes to /logger/ and clicks in the button "Add entry"...
As expected the link takes him to the page logger/log

However, there's an error somewhere that breaks the page.
I wrote ns_logs in the begin and end of the page and they actually showed up at error.log

So, it means the error is not in the page log.tcl
I debugged log.adp, looking for an include or something in order to assure the error wouldn't come from another page.

but there is nothing there except for
include src="/packages/logger/lib/entries"
that works fine and it has no errors.

The rest of the code in log.adp page is related to the log.tcl page that i showed it prints out both ns_log (begin and end).

what is the error then?

[06/Aug/2009:06:27:18][2236.3023997872][-conn:openacs::4] Notice: BEGIN PAGE LOG.TCL
[06/Aug/2009:06:27:18][2236.3023997872][-conn:openacs::4] Notice: 3484 + 3380
[06/Aug/2009:06:27:18][2236.3023997872][-conn:openacs::4] Notice: END LOG.TCL
[06/Aug/2009:06:27:22][2236.3023997872][-conn:openacs::4] Error: GET http://iurix.com:8090/logger/log?project_id=3484&pm_project_id=3482&return_url=http://iurix.com:8090/project-manager/one?project%5fitem%5fid=3482&variable_id=3380
referred by "http://iurix.com:8090/project-manager/one?project%5fitem%5fid=3482";
can't read "elements(sec_fieldset)": no such element in array
while executing
"lang::util::localize $elements(sec_fieldset)"
("for" body line 6)
invoked from within
"for { set __d25_i 1 } { $__d25_i <= ${elements:rowcount} } { incr __d25_i } {
upvar 0 elements:$__d25_i elements

if {! ([template::util::is_ni..."
("uplevel" body line 9)
invoked from within
"uplevel {
set __adp_output ""


if {[info exists elements]} {
upvar 0 elements __d25_swap
}

for { set __d25_i 1 } { $__d25_i <= ${element..."
(procedure "template::code::adp::/web/openacs/packages/acs-templating/re..." line 2)
invoked from within
"template::code::adp::$file_stub"
(procedure "template" line 51)
invoked from within
"template $id $style"
(procedure "template::form::generate" line 2)
invoked from within
"template::form::generate log_entry_form"
("eval" body line 1)
invoked from within
"eval template::form::$command $args"
(procedure "template::form" line 2)
invoked from within
"template::form generate log_entry_form "
invoked from within
"append __adp_output "[template::form generate log_entry_form ]""
("uplevel" body line 66)
invoked from within
"uplevel {
set __adp_output ""

set __adp_master [template::util::url_to_file "/packages/logger/lib/master" "$__adp_stub"]
set __adp_properties(tit..."
(procedure "template::code::adp::/web/openacs/packages/logger/www/log" line 2)
invoked from within
"template::code::${template_extension}::$__adp_stub"
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 6)
invoked from within
"$handler"
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
$handler
} ad_script_abort val {
# do nothing
}"
invoked from within
"rp_serve_concrete_file [ad_conn file]"
(procedure "rp_serve_abstract_file" line 60)
invoked from within
"rp_serve_abstract_file "$root/[ad_conn extra_url]""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/[ad_conn extra_url]"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl..."
^[[6~[06/Aug/2009:06:27:27][2236.2792389552][-sched:22-] Notice: Running notification::sweep::sweep_notifications ...
[06/Aug/2009:06:27:27][2236.2792389552][-sched:22-] Notice: 766 | 0

Collapse
Posted by Dave Bauer on
The logger package was not updated see: https://openacs.org/xowiki/dotlrn-zen-standards specifically "Using sections in ad_form" which behavior has changed.
Collapse
Posted by Iuri Sampaio on
Thanks Dave,

Direct and precise, the ad_form "add_entry" was full fields with of section property fields

cheers

Collapse
Posted by Iuri Sampaio on
Thanks Dave,

Direct and precise, the ad_form "add_entry" was full of fields with section property fields

cheers

Collapse
Posted by Iuri Sampaio on
The weird thing is that

the ad_form sections property doesn't work with logger pkg but it works fine with others such as project-manager -> templates -> tasks-ae

Collapse
Posted by Cesareo Garci­a Rodicio on
Hi Iuri

Thanks for document this, I lost a lot of time debugging this and it has been hard 😊

Anyway, how did you solve this?

I'm trying erasing lines with section, like ...
"
{section "[_ project-manager.Task]"} ... "

and apparently it's working.

Collapse
Posted by Ryan Gallimore on
See https://openacs.org/xowiki/Web_Forms for the proper syntax for sections in ad_form.