Forum OpenACS Development: error uploading a portrait in OpenACS.org

I was trying to upload a portrait in my OpenACS.org profile, but I found that error:

Database operation "0or1row" failed
(exception ERROR, "ERROR: function content_item__is_valid_child(integer, character varying, character varying) does not exist
LINE 1: ...item__is_subclass( $1 , 'content_item') = 't' and content_it...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT content_item__is_subclass( $1 , 'content_item') = 't' and content_item__is_valid_child( $2 , $3 , $4 ) = 'f'
CONTEXT: PL/pgSQL function "content_item__new" line 82 at IF
")

while executing
"ns_pg_bind 0or1row nsdb0 {

select content_item__new(:name,:parent_id,:item_id,:locale,:creation_date,:creation_user,:context_id,:creation_ip,:item_s..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
("uplevel" body line 8)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
# plsql calls that are simple selects bypass the plpgsql
# mechanism for creating anonymous fun..."
(procedure "db_exec_plsql" line 57)
invoked from within
"db_exec_plsql exec_func_plsql {}"
(procedure "package_exec_plsql" line 36)
invoked from within
"package_exec_plsql -var_list $var_list content_item new"
("uplevel" body line 7)
invoked from within
"uplevel 1 $transaction_code "
(procedure "db_transaction" line 1)
invoked from within
"db_transaction {
# An explict lock was necessary for PostgreSQL between 8.0 and
# 8.2; left the following statement here for documenta..."
(procedure "content::item::new" line 25)
invoked from within
"content::item::new -name "portrait-of-user-$user_id" -parent_id $user_id -content_type image"
("uplevel" body line 5)
invoked from within
"uplevel 1 $transaction_code "
(procedure "db_transaction" line 39)
invoked from within
"db_transaction {
set item_id [content::item::get_id_by_name -name "portrait-of-user-$user_id" -parent_id $user_id]
if { $item_id eq ""..."
("uplevel" body line 28)
invoked from within
"uplevel #$level $on_submit"
(procedure "ad_form" line 620)
invoked from within
"ad_form -extend -name "portrait_upload" -validate {

# check to see if this is one of the favored MIME types,
# e.g., image/gif or image/jpeg
..."
("uplevel" body line 84)
invoked from within
"uplevel {
ad_page_contract {
Uploading user portraits

@cvs-id $Id: upload.tcl,v 1.15 2009/03/31 15:16:47 emmar Exp $
} {
{user_id ""}
..."
(procedure "code::tcl::/usr/local/openacs.org/packages/acs-subsite/www/u..." line 2)
invoked from within
"code::tcl::$__adp_stub"
("uplevel" body line 12)
invoked from within
"uplevel {

if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init t..."
(procedure "adp_prepare" line 2)
invoked from within
"adp_prepare"
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..."

Collapse
Posted by Brian Fenton on
This has been an issue for years - I reported it about 4 years. I think there are a few bug reports about it too.