Forum OpenACS Development: Error upgrading XoWiki to 5.9.0
FYI: We upgraded XoWiki from 0.136 to 5.9.0, and got the following error. We're probably going to stick with 0.136 if possible because we did some customizations and upgrade later.
Cheers,
Frank
<h3>Upgrading xowiki 5.9.0</h3>
Upgraded xowiki, version 5.9.0.
Package enabled.Error: Database operation "dml" failed (exception ERROR, "ERROR: column o.tree_sortkey does not exist
LINE 7: ....last_modified, o.modifying_user, o.modifying_ip, o.tree_sor...
^
HINT: Perhaps you meant to reference the column "ci.tree_sortkey".
")
ERROR: column o.tree_sortkey does not exist
LINE 7: ....last_modified, o.modifying_user, o.modifying_ip, o.tree_sor...
^
HINT: Perhaps you meant to reference the column "ci.tree_sortkey".
SQL: create view xowiki_form_instance_item_view AS
SELECT
xi.package_id, xi.parent_id, xi.name,
xi.publish_status, xi.assignee, xi.state, xi.page_template, xi.item_id,
o.object_id, o.object_type, o.title AS object_title, o.context_id,
o.security_inherit_p, o.creation_user, o.creation_date, o.creation_ip,
o.last_modified, o.modifying_user, o.modifying_ip, o.tree_sortkey, o.max_child_sortkey,
cr.revision_id, cr.title, content_revision__get_content(cr.revision_id) AS text,
cr.description, cr.publish_date, cr.mime_type, cr.nls_language,
xowiki_form_page.xowiki_form_page_id,
xowiki_page_instance.page_instance_id,
xowiki_page_instance.instance_attributes,
xowiki_page.page_id,
xowiki_page.page_order,
xowiki_page.creator
FROM
xowiki_form_instance_item_index xi
left join cr_items ci on (ci.item_id = xi.item_id)
left join cr_revisions cr on (cr.revision_id = ci.live_revision)
left join acs_objects o on (o.object_id = ci.live_revision)
left join xowiki_page on (o.object_id = xowiki_page.page_id)
left join xowiki_page_instance on (o.object_id = xowiki_page_instance.page_instance_id)
left join xowiki_form_page on (o.object_id = xowiki_form_page.xowiki_form_page_id)
Database operation "dml" failed (exception ERROR, "ERROR: column o.tree_sortkey does not exist
LINE 7: ....last_modified, o.modifying_user, o.modifying_ip, o.tree_sor...
^
HINT: Perhaps you meant to reference the column "ci.tree_sortkey".
")
ERROR: column o.tree_sortkey does not exist
LINE 7: ....last_modified, o.modifying_user, o.modifying_ip, o.tree_sor...
^
HINT: Perhaps you meant to reference the column "ci.tree_sortkey".
SQL: create view xowiki_form_instance_item_view AS
SELECT
xi.package_id, xi.parent_id, xi.name,
xi.publish_status, xi.assignee, xi.state, xi.page_template, xi.item_id,
o.object_id, o.object_type, o.title AS object_title, o.context_id,
o.security_inherit_p, o.creation_user, o.creation_date, o.creation_ip,
o.last_modified, o.modifying_user, o.modifying_ip, o.tree_sortkey, o.max_child_sortkey,
cr.revision_id, cr.title, content_revision__get_content(cr.revision_id) AS text,
cr.description, cr.publish_date, cr.mime_type, cr.nls_language,
xowiki_form_page.xowiki_form_page_id,
xowiki_page_instance.page_instance_id,
xowiki_page_instance.instance_attributes,
xowiki_page.page_id,
xowiki_page.page_order,
xowiki_page.creator
FROM
xowiki_form_instance_item_index xi
left join cr_items ci on (ci.item_id = xi.item_id)
left join cr_revisions cr on (cr.revision_id = ci.live_revision)
left join acs_objects o on (o.object_id = ci.live_revision)
left join xowiki_page on (o.object_id = xowiki_page.page_id)
left join xowiki_page_instance on (o.object_id = xowiki_page_instance.page_instance_id)
left join xowiki_form_page on (o.object_id = xowiki_form_page.xowiki_form_page_id)
while executing
"ns_pg_bind dml nsdb0 {create view xowiki_form_instance_item_view AS
SELECT
xi.package_id, xi.parent_id, xi.name,
xi.publish_st..."
("uplevel" body line 1)
invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql]"
invoked from within
"db_exec dml $db $full_statement_name $sql"
("uplevel" body line 2)
invoked from within
"uplevel 1 $code_block "
invoked from within
"db_with_handle -dbn $dbn db {
db_exec dml $db $full_statement_name $sql
}"
(procedure "::nsf::procs::db_dml" line 99)
invoked from within
"::db_dml {dbqd.view xowiki_form_instance_item_view {
SELECT
xi.package_id, xi.parent_id, xi.name,
xi.publish_status, xi.assigne..."
("uplevel" body line 1)
invoked from within
"uplevel [list ::db_dml [uplevel [list [self] qn $qn]] $sql {*}$bindOpt]"
(procedure "dml" line 3)
::xo::dc ::xo::db::DB->dml
invoked from within
"::xo::dc dml create-view-$name "create view $name AS $definition""
(procedure "view" line 4)
::xo::db::require->view
invoked from within
"::xo::db::require view xowiki_form_instance_item_view [subst {
SELECT
xi.package_id, xi.parent_id, xi.name,
$hkey_in_view xi.pub..."
(procedure "__upgrade" line 537)
invoked from within
"__upgrade $from_version_name $to_version_name"
(procedure "::nsf::procs::xowiki::upgrade_callback" line 11)
invoked from within
"{*}$command"
(procedure "::nsf::procs::apm_invoke_callback_proc" line 36)
invoked from within
"apm_invoke_callback_proc -version_id $version_id -type after-upgrade -arg_list [list from_version_name $upgrade_from_version_name to_version_name $ve..."
(procedure "::nsf::procs::apm_package_install" line 212)
invoked from within
"apm_package_install -enable=$enable_p -package_path $package_path -callback apm_ns_write_callback -load_data_model -data_model_files $data_model_..."
It looks to me, that you are not installing xowiki as released with OpenACS 5.9.0, but some other version. As you can see in [1], in the version tagged with openacs-5-9-0-final the line 330 starts with the SQL comment marker "--" , whereas in your version, it seems as if lines 329 and 330 are joined together and someone has removed the "--".
Maybe, this is the "customization" you are talking about....
-gn
[1] https://github.com/openacs/xowiki/blob/openacs-5-9-0-final/tcl/xowiki-procs.tcl#L309
acs_objects.tree_sortkey errors ring a loud bell, as this column has been removed in the passage to 5.9.0
http://www.openacs.org/xowiki/openacs-todo
This was needed to build a hierarchy for objects in days before Postgres 8.4 and recursive queries.
This is another pointer of version mismatch during the upgrade.
All the best