Forum OpenACS Q&A: Problem with delopment tutorial

Collapse
Posted by Luis Garcia on

I get this error while executing the tutorial:

invalid command name "mfp::note::add"
while executing

"mfp::note::add -title $title"
("uplevel" body line 2)
invoked from within

"uplevel #$level $new_data"
("1" arm line 1)
invoked from within

"switch $errno {
0 {
# TCL_OK
}
1 {
# TCL_E..."
(procedure "ad_form" line 612)
invoked from within

"ad_form -name note -form {
{item_id:key}
{title:text {label Title}}

Any Ideas?

Collapse
Posted by Claudio Pasolini on
Probably the proc mfp::note::add has not been sourced.
Try /acs-admin/apm and follow the 'reload changed' link of the notes package.
Collapse
Posted by Luis Garcia on

already did that and did not work.

Thanks!

Collapse
Posted by xx xx on
Check if the file that you are reloading contains errors (above mfp::note::add). If I'm not mistaking errors above will prevent lower procs from being sourced. Is the proc and the others in that file listed under /api-doc ?
Collapse
Posted by Luis Garcia on

The files are listed and I did not see anything irregular in the code. I am using the files that come with the bundle. I did not do copy and paste.

Collapse
Posted by Luis Garcia on

I might be wrong; but it looks to me that it is complaining because this command "mfp::note::add" does not exist. So where is that suppoused to be defined?

Thanks!

Collapse
Posted by Luis Garcia on

OK, I found that I had missed an step. SO I uploaded the file "note-procs.tcl". Now, after doing that and re-loaded the files and rebooting the server, I still get this error:

Required switch -item_id not provided
while executing

"mfp::note::add__arg_parser"
(procedure "mfp::note::add" line 1)
invoked from within

"mfp::note::add -title $title"
("uplevel" body line 2)
invoked from within

"uplevel #$level $new_data"
("1" arm line 1)
invoked from within

"switch $errno { ...

So, I guess it means I am missing the note ID. Where is the ID generated?

Thanks!

Collapse
Posted by Harish Krishnan on
There is an error in the tutorial. Just refer to this thread:
https://openacs.org/forums/message-view?message%5fid=299667
Collapse
Posted by Luis Garcia on

That was it. The code is missing this line:

-item_id $item_id \

in the note-edit.tcl file.

Thanks!

Collapse
Posted by Jade Rubick on