Forum OpenACS Q&A: xowiki errors on delete revision

Collapse
Posted by Jon Griffin on
Here is the error I get when deleting the current revision.

Query did not return any rows.
while executing
"::db_1row fetch_from_view_item_id { select n.item_id,n.revision_id,n.creation_user,o.creation_date,n.last_modified,n.object_type,n.creation_user,n.las..."
::993 ::xotcl::Object->db_1row
invoked from within
"$object db_1row fetch_from_view_item_id " select [join $atts ,], i.parent_id from [my set table_name]i n, cr_items i, acs_objects o where i.item_..."
(procedure "fetch_object" line 24)
invoked from within
"next"
invoked from within
"ns_cache eval xotcl_object_cache $object {
set created 1
#my log "--CACHE new new [self]"
set o [next]
return [::Serializer de..."
(procedure "fetch_object" line 4)
::xowiki::Page ::Generic::CrCache->fetch_object
invoked from within
"my fetch_object -object ::[expr {$revision_id ? $revision_id : $item_id}] -item_id $item_id -revision_id $revision_id"
(procedure "instantiate" line 4)
::xowiki::Page ::Generic::CrClass->instantiate
invoked from within
"$object_type instantiate -item_id $item_id -revision_id $revision_id"
(procedure "instantiate" line 13)
::Generic::CrItem->instantiate
invoked from within
"::Generic::CrItem instantiate -item_id $item_id -revision_id $revision_id"
(procedure "resolve_request" line 39)
::977 ::xowiki::Package->resolve_request
invoked from within
"my resolve_request -path $object"
(procedure "resolve_page" line 20)
::977 ::xowiki::Package->resolve_page
invoked from within
"my resolve_page [my set object] method"
(procedure "invoke" line 6)
::977 ::xowiki::Package->invoke
invoked from within
"::$package_id invoke -method $m"
invoked from within
"::$package_id reply_to_user [::$package_id invoke -method $m]"
(file "/home/jon/web/salsab-dev/live/packages/xowiki/www/index.vuh" line 21)
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..."

Collapse
Posted by Jon Griffin on
After more research, it appears that if you don't make a live revision before you delete the live revision the proc blanks out the live_revision field, the latest_revision is set correctly.

Maybe the live revision should be set to latest_revision?

Collapse
Posted by Gustaf Neumann on
yes. one has to handle as well cases, where the latest revision is blank (xowiki deletes in this case the item).
fixed in cvs head.