Forum OpenACS Improvement Proposals (TIPs): Re: TIP #67: (Proposed) Tcl API for Content Repository

Collapse
Posted by Randy O'Meara on
Dave,

Some of the CR plsql procs that you made TCL-accessible with package_exec_plsql cannot be accessed in this manner because they are not defined as accessible procs via plsql define_function_args(). See the actual error message below. The first set I encountered were:

content::type::register_relation_type, and
content::type::unregister_relation_type
For these two, I simply added the appropriate define_function_args() calls:
select define_function_args('content_type__register_relation_type','content_type,target_type,relation_tag,min_n,max_n');
select define_function_args('content_type__unregister_relation_type','content_type,target_type,relation_tag');
to content-type.sql. These changes solved this particular set of problems. There are probably additional instances of this problem.

BTW, I am using your CR TCL API (successfully) under 5.1 by simply including the TCL files you provided. I'm forced to develop on 5.1 due to an error recently introduced on HEAD (here) that breaks the role system I've devised which utilizes rel_types::new. I don't know who introduced the breakage, but I cannot develop on HEAD until the breakage is repaired.

/R

Error generated before I added define_function_args:

ERROR:  Function content_type__register_relation_type() does not exist
    Unable to identify a function that satisfies the given argument types
    You may need to add explicit typecasts
SQL: 
    select content_type__register_relation_type()