On drush up error in console:

Fatal error: Class 'spamspan_admin' not found in /sites/all/modules/spamspan/spamspan.module on line 42

Comments

umberto.’s picture

Same error for me too.

Martin.Schwenke’s picture

Me too. I use spamspan on a couple of Drupal instances. One upgraded fine, the other has this error. Not sure what the relevant difference is. :-(

peterx’s picture

Classes are defined in the .info file in files[] =. The .info file is read when you enable a module. Disable/enable the module to make Drupal read the .info file.

I have not tested update.php with a .info file change. If the error still occurs on one of your sites, please test update.php and report the result. If update.php does not work, disable then enable.

The move to a class is to get the infrequently used code out of the standard page load and into memory only when needed. this should b standard practice for all Drupal 7 modules.

Martin.Schwenke’s picture

OK, I retried the one that was failing by having it ready to load update.php. That worked. The failure probably had something to do with loading a page with the admin overlay, and the underlying page possibly causing the failure.

My standard practice is always to link in the new version of the module, refresh the "Available updates" report to see if all is good, and then run update.php. I should probably reverse the last 2 steps...

Thanks!

peterx’s picture

Status: Active » Closed (fixed)

@Martin, when changing stuff in the .info file, I find disable then enable to be the most reliable way to make Drupal reprocess the .info file.

rwilson0429’s picture

I ran into the same problem after upgrading to the 7.x-1.1-beta4 version. Disabling and then re-enabling the module as peterx stated resolved the issue for me. Thanks peterx.

peterx’s picture

Assigned: Unassigned » peterx
rooby’s picture

A drush cc all should do the trick.