Forum .LRN Q&A: Re: Res: Re: RFC: things to improve themes package (theme-selva)

Hi Victor,

Finally I found what caused the error and fixed it. In the case when communities admin are allowed to change their site template, there was a recursive call between dotlrn_community::get_site_template_id_not_cached and dotlrn_community::get_site_template_id.

Here is the change I comitted for get_site_template_id_not_cached:

Index: community-procs.tcl
===================================================================
RCS file: /cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v
retrieving revision 1.191.2.23
retrieving revision 1.191.2.24
diff -u -r1.191.2.23 -r1.191.2.24
--- community-procs.tcl 3 Feb 2006 18:00:38 -0000       1.191.2.23
+++ community-procs.tcl 4 Mar 2006 19:56:47 -0000       1.191.2.24
@@ -2377,7 +2377,7 @@
        set dotlrn_package_id [dotlrn::get_package_id]
        set comm_site_template_id [db_string select_site_template_id {} -default "0"]
        if {[parameter::get -package_id $dotlrn_package_id -parameter AdminChangeSiteTemplate_p]} {
-           set site_template_id [get_site_template_id -community_id $community_id]
+               set site_template_id $comm_site_template_id
        } else {
            set site_template_id [parameter::get -package_id $dotlrn_package_id -parameter CommDefaultSiteTemplate_p]
            if {$site_template_id != $comm_site_template_id} {