Forum OpenACS Q&A: Re: Upload portrait broken?

Collapse
Posted by Orzenil Silva Junior on
Hi Nick,

I had the same error in a install where i have two instances of acs-subsite.

In parameter::get_from_package_key documentation:

"switches:

-package_key (required) - what package to get the parameter from. we will try to get the package_id from the package_key. this may cause an error if there are more than one instance of this package"

I could prevent this error just changing subsite::upload_allowed from packages/acs-subsite/tcl/subsite-procs.tcl :

change:

if { ![parameter::get_from_package_key -package_key acs-subsite -parameter SolicitPortraitP] } {

to

if { ![parameter::get_from_package_key -package_key acs-subsite -parameter SolicitPortraitP -default 1] } {

I am not sure it is a good fix so i did not put it as a patch but works for me