Forum OpenACS Development: Re: approach to refactoring ACS Mail Lite
Neither assigning a static value for package_id, nor creating a whole new package, with a new parameter worked fine. I ran the tests in the acs-developer shell
Example: parameter::get_from_package_key -package_key "evex-users" -parameter "ExternalWebsiteURL"
Both ad_procs [parameter::get] or [parameter::get_from_package_key] return blank (i.e. "") as value.
p.s. Parameter's accessible through APM -> (evex-users) pkg admin -> parameters
Sounds like a gremlin in the system!
Surely it's time to fill those procs with ns_log Debug comments.. and set Dev or Debug to on in /admin/nsstats.tcl
Maybe issue is temporal, taking a few minutes after restart to complete background processes?
Anyway, certainly worth investigating.
Note that parameter::get_from_package_key is supposed to work only for singleton packages. New packages should use global parameters instead (see ).
Hope this helps
I've done all that. I believe the problem exists because, instead of writing it directly within the file .info, I'd created the parameter through the interface (APM). Afterwards, I confirmed that the parameter was automatically generate within .info, then increased manually the version number and restarted NS, but unfortunately ad_procs still persist returning "".
My package isn't singleton, but I did use global scope.
parameter scope="global" datatype="string" min_n_values="1" max_n_values="1" name="CodeIgniterWebsiteUrl" default="http://dev.evex.co" description="Website URL for Venues & Services CMS in CodeIgniter"/
I'll debug this problem over the weekend and let you .
Getting back to the subject of refactoring ACS Mail Lite, I can help to do the job. Let me know if you guys need want my help.
In order to access the global parameter, one has to use parameter::get_global_value  instead of parameter::get. it might be an option to work towards unifying these calls, there is an agenda-point for parameters in the the 5.10.0 agenda.