Forum OpenACS Development: Spelling checking has broken fresh installs?

I just installed from HEAD and I can't login due to the following error:
Error: GET http://dsl-dhogaza.pacifier.net/register/?return%5furl=http%3a%2f%2fdsl%2ddhogaza%2epacifier%2enet%2f%3fdone%255fp%3d1
referred by "http://dsl-dhogaza.pacifier.net/?done_p=1"
no such array: spellchecker
    while executing
"nsv_get spellchecker path"
    (procedure "template::util::spellcheck::spellcheck_properties" line 11)
    invoked from within
"template::util::spellcheck::spellcheck_properties -element_ref element"
    (procedure "template::widget::text" line 5)
    invoked from within
Would somebody please fix this? :)
Collapse
Posted by Don Baccus on
I just fixed this and will commit in a moment.

A word to the novice Tcl programmer. Tcl evaluates all "[]" expressions contained in a command string before calling the command itself. Therefore the use of "catch" as used in the code snippet below does not guard against the execution of the caught expr later in the same expression:

set bin [ad_decode [catch {exec which aspell}] \
             0 [exec which aspell] \
             [ad_decode [catch {exec which ispell}] \
                  0 [exec which ispell] \
                  ""]]
This code fails if aspell is not found by exec. I've removed the cleverness in favor of cascading "if" statements which allow for the explicit control over when the various expressions are executed.
Collapse
Posted by Ola Hansson on
Uh oh! ... Thanks for fixing this, Don, and so quickly (I went to bed before seeing this so I couldn't have fixed it in a good eight hours).

I swear I tested it at least 20 times by putting various combinations of "qspell", "yspell", "olaisabadtester", etc., into the equation to simulate a non-existing binary. Apparently I missed a couple of permutations. Sorry for the inconvenience.

/Ola