After many, many, many hours I finally got this module working but only when it is the only one checked in the Content Analysis section on the page.

If Alchemy module are checked to run I get an error in the log:
PHP Fatal error: Class 'TextStatistics' not found in /var/www/html/sites/all/modules/readability/readability.module on line 90

I believe this actually has to do with the lines 48-51:
// check if another module has not already included the AlchemyAPI class.
if (class_exists('AlchemyAPI')) {
return TRUE;
}

which reside inside the following function:
/**
* Includes the Alchemy API Class, checking first to see if it exists.
*/
function readability_include_TextStatistics_class() {
// check if another module has not already included the AlchemyAPI class.
if (class_exists('AlchemyAPI')) {
return TRUE;
}
$files[] = './' . drupal_get_path('module', 'readability') . '/php-text-statistics/TextStatistics.php';
if (module_exists('libraries') && ($p = libraries_get_path('php-text-statistics'))) {
$files[] = './' . $p . '/TextStatistics.php';
}

Commenting out lines 49-51 seems to solve the problem of the hanging BUT I have a feeling that the Alchemy may also be required or something. Just not clear as to why this is being checked for.

If this is fixed in the dev version I apologize for the mentioning the issue. Didn't see any other issues on it.

Comments

jamatulli’s picture

BTW I think this is a great module and do appreciate the effort. The other problems I had installing were:

Permissions and ownership of new directory and file /php-text-statistics/TextStatistics.php. This appeared as hanging and apache error_log had PHP Fatal error: Class 'TextStatistics' not found in /var/www/html/sites/all/modules/readability/readability.module on line 90 which is the same one from above but I think was initially permissions related as well when I unchecked the other modules and still got the error.

Also...
I copied the text for TextStatistics.php from the link provided on the module page but it had some unintentional word wrapping on the longer lines 162 and 241 (I think) that caused errors.

jscm’s picture

I have the same problem.
is there a real solution?

Subscribing..

jscm’s picture

Priority: Normal » Major

is here anyone that have a solution to fix it?

ariettmarketing’s picture

I have the same issue only mine doesn't work even when it's the only one checked.

b-reid’s picture

Status: Active » Closed (outdated)

I am closing this issue because Drupal 6.x has reached EOL and is no longer supported as of February 26th, 2016.