Index: openacs-4/packages/acs-admin/acs-admin.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/acs-admin.info,v diff -u -N -r1.54 -r1.55 --- openacs-4/packages/acs-admin/acs-admin.info 23 Jun 2018 16:30:58 -0000 1.54 +++ openacs-4/packages/acs-admin/acs-admin.info 2 Jul 2018 15:54:40 -0000 1.55 @@ -9,7 +9,7 @@ f t - + Don Baccus An interface for Site-wide administration of an OpenACS Installation. 2017-08-06 @@ -20,9 +20,9 @@ GPL 3 - + - + Index: openacs-4/packages/acs-admin/www/apm/version-reload.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-reload.tcl,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/acs-admin/www/apm/version-reload.tcl 9 May 2018 15:33:28 -0000 1.15 +++ openacs-4/packages/acs-admin/www/apm/version-reload.tcl 2 Jul 2018 15:54:40 -0000 1.16 @@ -19,8 +19,10 @@ [list [export_vars -base version-view { version_id }] "$pretty_name $version_name"] \ $title] -# files in $files. -apm_mark_version_for_reload $version_id files +# +# Mark files in this package for reloading and return the list. +# +set files [apm_mark_version_for_reload $version_id] set files_to_watch [list] @@ -29,17 +31,38 @@ } else { append body "Marked the following file[ad_decode [llength $files] 1 "" "s"] for reloading:
    \n" - # Source all of the marked files using the current interpreter, accumulating - # errors into apm_package_load_errors + # + # Source all of the marked files using the current interpreter, + # accumulating errors in the provided variable + # array set errors [list] ad_try { - apm_load_any_changed_libraries errors + apm_load_any_changed_libraries -version_files $files errors + } on error {errorMsg} { + ns_log notice "version-reload: apm_load_any_changed_libraries lead to $errorMsg" set errHTML "

    Error during apm_load_any_changed_libraries:

    [ns_quotehtml $errorMsg]
    " + } on ok {r} { set errHTML "" } + ns_log notice "version-reload: apm_load_any_changed_libraries reports [array size errors] errors" + + if {[array size errors] > 0 || $errHTML ne ""} { + # + # When something went wrong during loading, we might have + # messed up already the blueprint for the current + # interpreter. So make sure, this interpreter is not used + # anymore. + # + if {[ns_info name] eq "NaviServer"} { + ns_ictl markfordelete + } else { + ns_markfordelete + } + } + if {[info exists errors($package_key)]} { array set package_errors $errors($package_key) } else { @@ -108,10 +131,6 @@
}] -# template::head::add_javascript -src "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" - -ad_return_template - # # Local variables: # mode: tcl