Forum OpenACS Development: dotlrn buf adding packages???

Collapse
Posted by Antonio Luis on
Hi, I`m developing some stuff in dotlrn, I found some very interesting info about integrate openAcs packages in dotlrn as portlets. The info is in this thread:

https://openacs.org/forums/message-view?message_id=299982

I have tryed to integrate an openACS package with the Nima`s solution but I get an error when trying to add the application to the community by Control Panel-->Manage Apllets-->My Package [add].
This error is:

portal::get_datasource_name error! No datasource with name "prueba2_admin_portlet" found

I think i have done all correctly, the sql scripts executly correctly and the aliases in the table acs_sc_impl_aliases are correct.

I have searched into the source code of dotlrn and I reach to the procedure portal::get_datasource_name this is the code:

##############################Code#########################

ad_proc -private get_datasource_name { ds_id } {
Get the ds name from the id or the null string if not found.

@param ds_id
@return ds_name
} {
if { ![catch {db_1row select {}} errmsg] } {
return $name
} else {
global errorInfo
set error_text "portal::get_datasource_name error! No datasource with id \"$ds_id\" found"
ns_log Error $error_text
ns_log Error "$errorInfo"
ad_return_complaint 1 $error_text
}
}

##########################Code############################
so look at the if clausule. The db_1row always catch an error isnt it?the sql sentence "select" always gives an error so this is a bug? Nima says it tested succesfully so i assume didn`t had to pass by this procedure???
Any suggestion????
Thanks in Advance