Index: openacs-4/packages/xowiki/tcl/xowiki-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-init.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/xowiki/tcl/xowiki-init.tcl 17 May 2018 07:35:53 -0000 1.3 +++ openacs-4/packages/xowiki/tcl/xowiki-init.tcl 3 Sep 2024 15:37:55 -0000 1.4 @@ -2,17 +2,28 @@ # Check, if we have to update the hkeys in the # form_instance_item_index. # -# We do this in an -init file, since at that time, all library files -# are usable. If we would do thisduring loading, we would have +# We do this in a *-init file, since at that time, all library files +# are usable. If we would do this during loading, we would have # problems with not-yet loaded library files from other packages. # -if {[nsv_exists xowiki must_update_hkeys] && [nsv_get xowiki must_update_hkeys]} { +if {[nsv_exists xowiki must_update_hkeys] + && [nsv_get xowiki must_update_hkeys] + } { ::xowiki::hstore::update_update_all_form_instances nsv_unset xowiki must_update_hkeys } +# Make sure, the site-wide pages are loaded and/or refetched when the +# source code in the prototype pages changed. +# +::xo::dc transaction { + ::xowiki::Package require_site_wide_pages -refetch_if_modified true +} on_error { + ns_log error "xowiki-init: require_site_wide_pages lead to: $errmsg" +} + set ::xowiki::search_mounted_p 1 -set search_driver [parameter::get -package_id [apm_package_id_from_key search] \ +set search_driver [parameter::get_from_package_key -package_key search \ -parameter FtsEngineDriver] # @@ -24,13 +35,13 @@ # example, if search is available for a certain subsite (when search # is subsite aware). # -if { [site_node::get_package_url -package_key search] eq "" } { - ns_log Warning "xowiki: Search package is not mounted." +if { [site_node::get_package_url -package_key search] eq "" } { + ns_log notice "xowiki: Search package is not mounted." set ::xowiki::search_mounted_p 0 } elseif { $search_driver eq ""} { ns_log Warning "xowiki: FtsEngineDriver parameter in package search is empty." set ::xowiki::search_mounted_p 0 -} elseif { [apm_package_id_from_key $search_driver] == 0} { +} elseif { [apm_package_id_from_key $search_driver] == 0} { ns_log Warning "xowiki Search driver $search_driver is not installed." set ::xowiki::search_mounted_p 0 } else {