Forum OpenACS Development: Error page message
so something happened with a variable called "memoize_cache".
Then something is happening with the lars blogger...
There was a server error processing your request. We apologize.
Take me back where I was (before the error)
Database operation "0or1row" failed (exception NSINT, "Query returned more than one row.")
SQL:
select package_id
from apm_packages
where package_key = 'lars-blogger'
while executing
"ns_pg_bind 0or1row nsdb0 {
select package_id
from apm_packages
where package_key = :package_key
}"
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
"switch $driverkey {
oracle {
return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
}
..."
invoked from within
"db_exec 0or1row $db $full_name $sql"
invoked from within
"set selection [db_exec 0or1row $db $full_name $sql]"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec 0or1row $db $full_name $sql]
}"
(procedure "db_string" line 8)
invoked from within
"db_string apm_package_id_from_key {
select package_id from apm_packages where package_key = :package_key
} -default 0"
(procedure "apm_package_id_from_key_mem" line 2)
invoked from within
"apm_package_id_from_key_mem lars-blogger"
("eval" body line 1)
invoked from within
"eval $script"
invoked from within
"ns_cache eval util_memoize $script {
list $current_time [eval $script]
}"
(procedure "util_memoize" line 20)
invoked from within
"util_memoize "apm_package_id_from_key_mem $package_key""
(procedure "apm_package_id_from_key" line 2)
invoked from within
"apm_package_id_from_key $your_applet"
invoked from within
"set package_id [apm_package_id_from_key $your_applet]"
("uplevel" body line 33)
invoked from within
"uplevel {
#Setting the main page to show up three modules: Spotlights,News and Edit-this-page
#
set url [ad_conn url]
if { [string equal $url "/yabt/..."
(procedure "code::tcl::/home/yabt/yabt/packages/edit-this-page/templates..." line 2)
invoked from within
"code::tcl::$__adp_stub"
invoked from within
"if { [file exists $__adp_stub.tcl] } {
# ensure that data source preparation procedure exists and is up-to-date
adp_init tcl $__adp_stub
..."
("uplevel" body line 3)
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 "
(procedure "template::adp_parse" line 30)
invoked from within
"template::adp_parse $__adp_master [concat [list __adp_slave $__adp_output] [array get __adp_properties]]"
(procedure "template::adp_parse" line 91)
invoked from within
"template::adp_parse $__adp_master [concat [list __adp_slave $__adp_output] [array get __adp_properties]]"
(procedure "template::adp_parse" line 91)
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 5)
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 $path"
(procedure "rp_internal_redirect" line 26)
invoked from within
"rp_internal_redirect $path"
(file "/home/yabt/yabt/packages/edit-this-page/www/index.vuh" line 50)
invoked from within
"source [ad_conn file]"
(procedure "rp_handle_tcl_request" line 3)
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/$path""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/$path"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl_url2path_info..."
Could you give us more detailed information on what you did and what happened?
It sounds to me like you clicked on the 'flush' button on the DS toolbar, saw an error message which had 'memoize_cache' in it (Specific error messages are more helpful) and now you're getting an error whenever you click anywhere in your blogger app? Is that right?
Which specific URL is giving you an error and what is the error (from error.log)? That will help us find the problem.
"set package_id [apm_package_id_from_key $your_applet]"
("uplevel" body line 33)
invoked from within
"uplevel {
#Setting the main page to show up three modules: Spotlights,News and Edit-this-page
#
apm_package_id_from_key was cached ("util_memoize "apm_package_id_from_key_mem $package_key"") and when you flushed the cache, it had to run the quer again. The query assumes only one instance of a package with the package key "lars-blogger" (in this case) but there is more than one.
I don't have lars-blogger as include in the page.
http://www.myybiz.net.
it has only two instances of diferent packages: edit-this-page and news. the rest are adp and css pages includes.
but just in case I'm looking for trash codes at the main page.
by the way, it's weird, if i browse back and forth trough the pages seening the error, then i get the page working perfect.
My guess is once you visit the page and go back and forth trhough them it doesn't load something that cause the error. But i have no clue what procedure, even what page the error is happening. It's hard to figure out the paths.
Here it's error.log
I don't get the first part since i've checked the messages and the form. they exists and are there.
then the database failed:
[15/Jun/2006:00:54:19][10993.4][-conn:yabt::0] Error: lang::message::lookup: Key 'menu-msgs.AnnuaPlanLink' does not exist in en_US
[15/Jun/2006:00:54:29][10993.6][-conn:yabt::1] Warning: template::form::check_elements: MISSING FORMWIDGET: search:search:formbutton:ok
[15/Jun/2006:00:54:29][10993.6][-conn:yabt::1] Error: lang::message::lookup: Key 'menu-msgs.AnnuaPlanLink' does not exist in en_US
[15/Jun/2006:00:54:41][10993.6][-conn:yabt::1] Error: lang::message::lookup: Key 'menu-msgs.AnnuaPlanLink' does not exist in en_US
[15/Jun/2006:00:56:27][10993.6][-conn:yabt::1] Error: GET http://www.myybiz.net/yabt/main/?
referred by ""
Database operation "0or1row" failed (exception NSINT, "Query returned more than one row.")
SQL:
select package_id
from apm_packages
where package_key = 'lars-blogger'
while executing
"ns_pg_bind 0or1row nsdb0 {
select package_id
from apm_packages
where package_key = :package_key
}"
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
("postgresql" arm line 2)
invoked from within
"switch $driverkey {
oracle {
return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
}
..."
invoked from within
"db_exec 0or1row $db $full_name $sql"
invoked from within
"set selection [db_exec 0or1row $db $full_name $sql]"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
set selection [db_exec 0or1row $db $full_name $sql]
}"
(procedure "db_string" line 8)
invoked from within
"db_string apm_package_id_from_key {
select package_id from apm_packages where package_key = :package_key
} -default 0"
(procedure "apm_package_id_from_key_mem" line 2)
invoked from within
"apm_package_id_from_key_mem lars-blogger"
("eval" body line 1)
invoked from within
"eval $script"
invoked from within
"ns_cache eval util_memoize $script {
list $current_time [eval $script]
}"
(procedure "util_memoize" line 20)
invoked from within
"util_memoize "apm_package_id_from_key_mem $package_key""
(procedure "apm_package_id_from_key" line 2)
invoked from within
"apm_package_id_from_key $your_applet"
invoked from within
"set package_id [apm_package_id_from_key $your_applet]"
("uplevel" body line 33)
invoked from within
"uplevel {
#Setting the main page to show up three modules: Spotlights,News and Edit-this-page
#
set url [ad_conn url]
if { [string equal $url "/yabt/..."
(procedure "code::tcl::/home/yabt/yabt/packages/edit-this-page/templates..." line 2)
invoked from within
"code::tcl::$__adp_stub"
invoked from within
"if { [file exists $__adp_stub.tcl] } {
# ensure that data source preparation procedure exists and is up-to-date
adp_init tcl $__adp_stub
..."
("uplevel" body line 3)
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 "
(procedure "template::adp_parse" line 30)
invoked from within
"template::adp_parse $__adp_master [concat [list __adp_slave $__adp_output] [array get __adp_properties]]"
(procedure "template::adp_parse" line 91)
invoked from within
"template::adp_parse $__adp_master [concat [list __adp_slave $__adp_output] [array get __adp_properties]]"
(procedure "template::adp_parse" line 91)
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 5)
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 $path"
(procedure "rp_internal_redirect" line 26)
invoked from within
"rp_internal_redirect $path"
(file "/home/yabt/yabt/packages/edit-this-page/www/index.vuh" line 50)
invoked from within
"source [ad_conn file]"
(procedure "rp_handle_tcl_request" line 3)
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/$path""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/$path"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl_url2path_info..."
edit-this-page/templates/depts/index.tcl
The strange thing is the adp file has only these lines:
master
property name="title" /property
property name="header_stuff"@headerstuff;noquote@/property>
property name="context"@context;noquote@/property
slave
so it seems all the code in the tcl file is unecessary but the code related to @headerstyff@ and context. is that it?
by the way, i checked the new version of edit-this-page pkg. and it's not the same direcotry tree anymore.
the easiest way. =)
I drop the db and import an earlier week-backup.
now i will diagnose what hapen using the dev server and the db backup with the bug.
the weird thing that was happening, if i browsed back and foward through the pages...
the error disapear and i had the page loaded and fine,
somehow it's the cookies storaged in my computer.
by the way...
why do we use cookies instead of just sessions like it's in asp? security stuff?
i debuged the error and make it happens again.
So i'm sure the error is because
i created an aplication type: "webbloger" bellow a new subsite. and got the error, then i tryed to delete the aplication, even the subsite but the error's still there. SO even "deleting does not" erase the relations created.
Then somehow, it crashes.
I believe there's trash code running the query twice.
how do i fix then without resetting the db?
finding the duplicated trash code and erase it. is that it?
Error diagnosed and so far eliminated
It was an application I created at webcasts subsite.
I created an instance of lars-bloger bellow webcast’s subsite and it crashed with another instance on every page that has this instance referred. So when he clicked on flush it refreshed the buffer and the bug showed up.
there was some chunk of code related with lars-bloger pkg, precisesly a call to an instance of the pkg. and because of it it crashed triyng to call it twice.
Some trash code in the pages of the source that I already cleaned up on the page packages/edit-this-page/index.tcl
Then i replaced edit-this-page pkg to i guess the most updated head's version.
cvs -d mailto:anonymous@cvs.openacs.org:/cvsroot co openacs-4
see it: http://www.openacs.org/forums/message-view?message%5fid=435246
and it's working fine! thanks.