Index: openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl 27 Aug 2024 08:32:12 -0000 1.1.2.4 +++ openacs-4/packages/xowf/tcl/xowf-callback-procs.tcl 29 Aug 2024 17:53:50 -0000 1.1.2.5 @@ -16,7 +16,21 @@ # # Create a parameter page for convenience # - ::xowf::Package initialize -package_id $package_id + # The parameter page needs a creation user. Since we are running + # in a callback, the user_id is 0, which is not defined in the + # users table. Therefore, we fetch the first site-wide admin user. + # + set user_id [::xo::dc list get_admin { + select user_id,p.object_id from acs_permissions p, users u, acs_magic_objects m + where user_id = p.grantee_id and p.object_id = m.object_id and m.name = 'security_context_root' + FETCH FIRST 1 ROWS ONLY + }] + # + # Initialize the package + # + ns_log notice ".... ::xowf::after-instantiate initialize package with -package_id $package_id -user_id $user_id" + ::xowf::Package initialize -package_id $package_id -user_id $user_id + ::xowf::Package configure_fresh_instance \ -package_id $package_id \ -parameters [::xowf::Package default_package_parameters] \