After installing ATR and enabling each section apart from Drupal code, I got the following error message: 'Spell Check requires GNU Aspell. Please make sure it is installed and set up.'

Please add 'Depends on: GNU Aspell' in the Spell Check section.

Comments

lisarex’s picture

Title: Let users installing ATR that they'll need GNU Aspell installed » Let users know that they'll need GNU Aspell when installing ATR
xano’s picture

I agree that this is kind of a whacky thing. The problem is that regular dependencies only work for Drupal modules. GNU Aspell is an application that runs under the server's OS and not under Drupal. Because there is no way to make sure it exists during installation without possibly causing a timeout, users can currently install the module without GNU Aspell being installed. They are expected to install Aspell and tell the module where to find the application.

I'll talk to some more people, ask in some more IRC channels and see if someone can come up with a better way to do this.

lisarex’s picture

Perhaps it could be solved with just a bit of copy? BTW, without any info, I just put GNU Aspell in my modules directory and your module was smart enough that it didn't need to be told where to find GNU Aspell. :)

greywolfsspirit’s picture

ok, lisarex, you said you put aspell in your modules directory.. please clarify.. in your modules directory, do you mean in the spellchecker module directory, or in your sites/modules as an aspell directory? Did you copy the aspell directory and all its subdirectories with it in there (including the data, bin, and all that), or just the exe file. The path information for setting up aspell for the spellcheck/atr module is driving me up the wall.. been working at it for 4 hours now. I had it working just fine in drupal 5.. now.. it's totally screwed.

My initial installation of aspell is in

C:\aspell

I have tried setting the path in the ATR module to..
C:\aspell
C:/aspell
c:\aspell\bin
c:/aspell/bin
c:\aspell\bin\aspell.exe
c:/aspell/bin/aspell.exe

and None of them detect the program.

A little information of how you got it working would greatly be appreciated!

Jim

xano’s picture

The problem is that regular dependencies only work for Drupal modules. GNU Aspell is an application that runs under the server's OS and not under Drupal.

This is why you can't (and shouldn't) put Aspell in your Drupal folders. @greywolfsspirit: I believe you did good by installing it there. Based on your info I believe C:\aspell\bin\aspell.exe is the correct path to enter in the ATR settings, but I have never tested this under Windows yet, so I'm not sure. It might be that the way the module approaches Aspell simply doesn't work in Windows, but only in *NIX based systems (BSD, Linux, OS X, etc.).

Could you test if Aspell.exe can be used through the command line with the following command?
$aspell -a --lang=$language -d $language --sug-mode=$sug_mode < $path
- $aspell is the path to aspell.exe from where you are now. I'm not sure if you need to type the .exe though.
- $language is the ISO 639 language code for the language you're using. Make sure the Aspell dictionary for that language is installed.
- $sug_mode is the suggestion mode as per http://aspell.net/man-html/Notes-on-the-Different-Suggestion-Modes.html#....
- $path is the path to the file your texts are in.

xano’s picture

Project: Automated Text Review » Spell Check

The entire spell check functionality has been move to a separate project.

xano’s picture

Title: Let users know that they'll need GNU Aspell when installing ATR » Let users know that they'll need GNU Aspell when installing Spell check

No comment.

mcarbone’s picture

Also, there's a typo in spellcheck_aspell_exists():

exec('which' . variable_get('spellcheck_aspell_binary', 'aspell'), $output, $code);

should be

exec('which ' . variable_get('spellcheck_aspell_binary', 'aspell'), $output, $code);

xano’s picture

Assigned: Unassigned » xano
Status: Active » Fixed

The code now uses PHP's Pspell extension, which has been added as an explicit requirement. Users can no longer install this module without installing Pspell and there is a link to the official Pspell documentation.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xano’s picture

Assigned: xano » Unassigned