Forum OpenACS Development: Unexpected error "expected boolean value but got ..."

Hello all,

I've tried to create new application (package). And after some manipulation I've got the error for all url:

-- start here --
expected boolean value but got ""
while executing
"if { [lang::util::translator_mode_p] } {
# Translator mode - record the message lookup
lang::util::record_message_lookup $key
..."
(procedure "lang::message::lookup" line 83)
invoked from within
"lang::message::lookup $__ad_conn_locale {acs-subsite.Applications} {TRANSLATION MISSING} {} -1"
("uplevel" body line 16)
invoked from within
"uplevel {
set __adp_output {}; set __ad_conn_locale [ad_conn locale]

set __adp_master [template::util::url_to_file "[parameter::get -package_..."
(procedure "template::code::adp::/var/www/oacs-HEAD/packages/acs-subsite..." line 2)
invoked from within
"template::code::${template_extension}::$__adp_stub"
invoked from within
"template::adp_parse [file rootname [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 6)
invoked from within
"$handler"
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
$handler
} ad_script_abort val {
# do nothing
}"
invoked from within
"rp_serve_concrete_file [ad_conn file]"
(procedure "rp_serve_abstract_file" line 60)
invoked from within
"rp_serve_abstract_file "$root/$extra_url""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/$extra_url"
set tcl_url2file([ad_conn url]) [ad_conn file]
set ..."
-- stop here --

I'm using openacs version 5.10 and I've used package Developer Support (for translation and etc.)

I'll be appreciate for your advice about resolving this error.

i can explain the symptoms, but not the cause. The function lang::util::translator_mode_p returns on your site an empty string instead of a boolean value. This can happen only, when "ad_get_client_property -default 0 acs-lang translator_mode_p" returns empty. The change in [1] returns the default-value instead of "" for cases ad_get_client_property fails, which might help. Can it be that you switched between http and https?

In case the value in the database is incorrect, starting a new session (logout/login) should help. You can check, what's in the client properties via "select * from sec_session_properties;"

Hope this helps a little.
-g

[1] http://cvs.openacs.org/changelog/OpenACS?cs=oacs-5-9%3Agustafn%3A20150920092851

Collapse
Posted by Vlad V on
1. I don't use https.
2. I couldn't do logout\login because I had got error for any url (see above).

But I've done sql command "truncate table sec_session_properties" and restart web server and database. After that I stopped getting the error and web looks like as working. Could you clarify - I can use package Automated Testing for check efficiency?

I can't clarify further, since i have never seen the problem on any site, and there is no way to reproduce the problem without more information. My explanation was based on the source code of lang::util::translator_mode_p [1] and ad_get_client_property [2]. Since "-cache-only" was not set in the call, and - as you said - you are not using a secure connection, the only option is that the empty value was coming from the database. ... but i have no idea, how it got there. Maybe related to your modifications?

-g

[1] https://openacs.org/api-doc/proc-view?proc=lang%3a%3autil%3a%3atranslator_mode_p&source_p=1
[2] https://openacs.org/api-doc/proc-view?proc=ad_get_client_property&source_p=1

Collapse
Posted by Vlad V on
I will check the efficiency of the process is maintained.
concerning "couldn't logout": what you can do always is to delete the AD*-cookies in your browser. This will log you out (force fresh login).