Forum OpenACS Q&A: Upgrade to /contrib/photo-album fails

Collapse
Posted by Jade Rubick on
I wanted to use the bulk-upload facility in the new photo-album, so I downloaded it from cvs:

cd /tmp
cvs -z9 -d :ext:mailto:jader@openacs.org:/cvsroot co openacs-4/contrib/packages/photo-album

Took down the server
svc -d /service/rubick-dev

copied over all the files

Brought up the server
svc -u /service/rubick-dev

Went into the APM, clicked on Install packages, went to upgrade Photo Album, and bam!

Looks like a view wasn't created at the right time?

Loading data model /web/rubick-dev/packages/photo-album/sql/postgresql/upgrade/upgrade-4.0.1-4.5.sql...
UPDATE 0
CREATE
COMMENT
CREATE
COMMENT
acs_object_type__create_type
------------------------------
                            0
(1 row)
CREATE
CREATE
CREATE
ALTER
ALTER
ALTER
ALTER
COMMENT
COMMENT
COMMENT
COMMENT
content_type__create_attribute
--------------------------------
                            100
(1 row)
ALTER
ALTER
ALTER
ALTER
ALTER
ALTER
ALTER
ALTER
ALTER
ALTER
content_type__create_attribute
--------------------------------
                            101
(1 row)
content_type__create_attribute
--------------------------------
                            102
(1 row)
content_type__create_attribute
--------------------------------
                            103
(1 row)
content_type__create_attribute
--------------------------------
                            104
(1 row)
content_type__create_attribute
--------------------------------
                            105
(1 row)
content_type__create_attribute
--------------------------------
                            106
(1 row)
content_type__create_attribute
--------------------------------
                            107
(1 row)
content_type__create_attribute
--------------------------------
                            108
(1 row)
content_type__create_attribute
--------------------------------
                            109
(1 row)
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
HTTP/1.0 200 OK
Server: AOLserver/3.3.1+ad13
Content-Type: text/html; charset=iso-8859-1
MIME-Version: 1.0
Date: Sun, 31 Aug 2003 18:18:43 GMT
Content-Length: 3053
Connection: close

Request Error

psql:upgrade-4.0.1-4.5.sql:166: ERROR:  view "all_photo_images" does not exist

    invoked from within
"db_source_sql_file -callback $callback $path/$file_path"
    (procedure "apm_package_install_data_model" line 32)
    invoked from within
"apm_package_install_data_model -callback $callback -data_model_files $data_model_files $spec_file_path"
    (procedure "apm_package_install" line 103)
    invoked from within
"apm_package_install  -enable=$enable_p  -install_path $install_path  -callback apm_ns_write_callback  -load_data_model  -data_model_files $data_model_..."
    ("foreach" body line 45)
    invoked from within
"foreach pkg_info $pkg_install_list {
    set spec_file [pkg_info_spec $pkg_info]
    if { [catch {
        array set version [apm_read_package_info_file $spe..."
    ("uplevel" body line 36)
    invoked from within
"uplevel {
          ad_page_contract {

    Installs the packages.

    @author Bryan Quinn (mailto:bquinn@arsdigita.com)
    @creation-date Mon Oct  9 00:22:31..."
    (procedure "code::tcl::/web/rubick-dev/packages/acs-admin/www/apm/packag..." 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 [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    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([ad_conn url]) [ad_conn path_inf..."

mailto:jade@rubick-dev.com

Collapse
Posted by Vinod Kurup on
Sorry, my bad. For some reason, I thought the all_photo_images was present in 4.0.1, so I dropped it before recreating it. Since it's not present in 4.0.1, the upgrade script bombs when it tried to drop a nonexistent view. It looks like the rest of the script was processed appropriately (based on the debug statement output above), so your photo-album should be fully upgraded to 4.5.
Collapse
Posted by Jade Rubick on
I was able to get it to work by going through the scripts manually, and entering in each one. Not sure why it worked manually.