Summary | pspell + html composition == no spell check |
Queue | IMP |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | chuck (at) horde (dot) org |
Requester | aj (at) mindcrash (dot) com |
Created | 06/29/2007 (6550 days ago) |
Due | |
Updated | 08/13/2007 (6505 days ago) |
Assigned | 07/01/2007 (6548 days ago) |
Resolved | 08/13/2007 (6505 days ago) |
Milestone | |
Patch | No |
Assigned to Chuck Hagenbuch
State ⇒ Resolved
driver is pspell. Having it appear/disappear depending on format is
probably too confusing.
checking if using pspell and in html composition mode.
pspell can't be used for spellchecking with HTML:
http://cvs.horde.org/co.php?r=1.87&f=imp%2Fdocs%2FINSTALL
I am using this sentence as a test.
Mary had a little labm
With text composition, this works fine and finds the misspelled word.
If I switch to HTML composition, it does not work at all and the check
spelling button just sits at Checking.
One more issue. If I add a period at the end of the sentence like this.
Mary had a little labm.
I get the same behavior as I do with HTML composition, the Check
Spelling button changes to Checking and hangs. This is with text
composition.
Can you reproduce this? I have tried w/ both Firefox and IE.
web browser, are you? If not, just make sure your PATH is set
appropriately before you run them.
Priority ⇒ 1. Low
anything in your path; for some reason the is_executable check isn't
catching it.
--- OUTPUT ----
which: no aspell in ((null))
which: no ispell in ((null))
object(PEAR_Error)#3 (8) {
["error_message_prefix"]=>
string(0) ""
["mode"]=>
int(1)
["level"]=>
int(1024)
["code"]=>
int(127)
["message"]=>
string(45) "spellcheck failed: sh: -a: command not found
"
["userinfo"]=>
NULL
["backtrace"]=>
array(3) {
[0]=>
array(6) {
["file"]=>
string(27) "/usr/local/lib/php/PEAR.php"
["line"]=>
int(572)
["function"]=>
string(10) "PEAR_Error"
["class"]=>
string(10) "PEAR_Error"
["type"]=>
string(2) "->"
["args"]=>
array(5) {
[0]=>
string(45) "spellcheck failed: sh: -a: command not found
"
[1]=>
int(127)
[2]=>
int(1)
[3]=>
int(1024)
[4]=>
NULL
}
}
[1]=>
array(7) {
["file"]=>
string(48) "/usr/local/lib/php/Horde/SpellChecker/aspell.php"
["line"]=>
int(65)
["function"]=>
string(10) "raiseError"
["class"]=>
string(4) "PEAR"
["object"]=>
object(SpellChecker_aspell)#2 (9) {
["_path"]=>
string(0) ""
["_maxSuggestions"]=>
int(10)
["_minLength"]=>
int(3)
["_locale"]=>
string(2) "en"
["_encoding"]=>
string(10) "iso-8859-1"
["_output_encoding"]=>
string(10) "ISO-8859-1"
["_html"]=>
bool(false)
["_suggestMode"]=>
int(1)
["_localDict"]=>
array(0) {
}
}
["type"]=>
string(2) "->"
["args"]=>
array(2) {
[0]=>
string(45) "spellcheck failed: sh: -a: command not found
"
[1]=>
int(127)
}
}
[2]=>
array(7) {
["file"]=>
string(71)
"/var/webdata/mycampus-ssl/framework/SpellChecker/tests/basic-aspell.php"
["line"]=>
int(10)
["function"]=>
string(10) "spellCheck"
["class"]=>
string(19) "SpellChecker_aspell"
["object"]=>
object(SpellChecker_aspell)#2 (9) {
["_path"]=>
string(0) ""
["_maxSuggestions"]=>
int(10)
["_minLength"]=>
int(3)
["_locale"]=>
string(2) "en"
["_encoding"]=>
string(10) "iso-8859-1"
["_output_encoding"]=>
string(10) "ISO-8859-1"
["_html"]=>
bool(false)
["_suggestMode"]=>
int(1)
["_localDict"]=>
array(0) {
}
}
["type"]=>
string(2) "->"
["args"]=>
array(1) {
[0]=>
string(21) "some tet [mispeled] ?"
}
}
}
["callback"]=>
NULL
which that isn't an executable program, and also fixed some other
stuff in terms of dependencies.
Probably you'll find out that the programs really aren't in your path,
or that you don't have the dictionary for them.
---- Output ----
which: no aspell in ((null))
which: no ispell in ((null))
object(PEAR_Error)#2 (8) {
["error_message_prefix"]=>
string(0) ""
["mode"]=>
int(1)
["level"]=>
int(1024)
["code"]=>
int(127)
["message"]=>
string(17) "spellcheck failed"
["userinfo"]=>
NULL
["backtrace"]=>
array(3) {
[0]=>
array(6) {
["file"]=>
string(27) "/usr/local/lib/php/PEAR.php"
["line"]=>
int(572)
["function"]=>
string(10) "PEAR_Error"
["class"]=>
string(10) "PEAR_Error"
["type"]=>
string(2) "->"
["args"]=>
array(5) {
[0]=>
string(17) "spellcheck failed"
[1]=>
int(127)
[2]=>
int(1)
[3]=>
int(1024)
[4]=>
NULL
}
}
[1]=>
array(7) {
["file"]=>
string(48) "/usr/local/lib/php/Horde/SpellChecker/aspell.php"
["line"]=>
int(65)
["function"]=>
string(10) "raiseError"
["class"]=>
string(4) "PEAR"
["object"]=>
object(SpellChecker_aspell)#1 (8) {
["_path"]=>
string(0) ""
["_maxSuggestions"]=>
int(10)
["_minLength"]=>
int(3)
["_locale"]=>
string(2) "en"
["_encoding"]=>
string(10) "iso-8859-1"
["_html"]=>
bool(false)
["_suggestMode"]=>
int(1)
["_localDict"]=>
array(0) {
}
}
["type"]=>
string(2) "->"
["args"]=>
array(2) {
[0]=>
string(17) "spellcheck failed"
[1]=>
int(127)
}
}
[2]=>
array(7) {
["file"]=>
string(71)
"/var/webdata/horde/framework/SpellChecker/tests/basic-aspell.php"
["line"]=>
int(10)
["function"]=>
string(10) "spellCheck"
["class"]=>
string(19) "SpellChecker_aspell"
["object"]=>
object(SpellChecker_aspell)#1 (8) {
["_path"]=>
string(0) ""
["_maxSuggestions"]=>
int(10)
["_minLength"]=>
int(3)
["_locale"]=>
string(2) "en"
["_encoding"]=>
string(10) "iso-8859-1"
["_html"]=>
bool(false)
["_suggestMode"]=>
int(1)
["_localDict"]=>
array(0) {
}
}
["type"]=>
string(2) "->"
["args"]=>
array(1) {
[0]=>
string(21) "some tet [mispeled] ?"
}
}
}
["callback"]=>
NULL
it doesn't find aspell. So what is the output (the .out) file?
[root@www1 tests]# pear run-tests basic-aspell.phpt
Running 1 tests
FAIL Basic aspell driver test[basic-aspell.phpt]
wrote log to "/var/webdata/horde/framework/SpellChecker/tests/run-tests.log"
TOTAL TIME: 00:00
0 PASSED TESTS
0 SKIPPED TESTS
1 FAILED TESTS:
basic-aspell.phpt
/usr/local/bin is in my PATH, which is where aspell is. Is there any
way I can pass the PATH to aspell to this test script?
Thanks.
to match the versions.
see aspell?
which: no aspell in ((null))
which: no ispell in ((null))
However, when I run the which command as the apache user, I get the following:
[www@www1 ~]$ which aspell
/usr/local/bin/aspell
This is very puzzling, is there any reason that the script does not
see aspell?
State ⇒ Feedback
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Queue ⇒ IMP
Summary ⇒ Spell Check does not function
Type ⇒ Bug
does not work.
Here are the appropriate section of my imp/conf.php.
$conf['spell']['path'] = '/usr/local/bin/aspell';
$conf['spell']['driver'] = 'aspell';
I am using the latest version of Aspell from ftp.gnu.org and the
latest English dictionary from there as well. When I click "Check
Spelling" the message body field changes to the uneditable field, but
no spelling errors are detected when there are errors. This is with
text composition. With HTML composition, it never changes to the
uneditable field and nothing happens when i click "Check Spelling".