Comments

Dave Reid’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not sure how to help here. Can you provide a backtrace showing where it's trying to load the class?

morbiD’s picture

Status: Postponed (maintainer needs more info) » Active

I've just encountered this error as well when attempting to upgrade from 7.x-1.0-rc2 to 7.x-2.1:

Fatal error: Class 'DrupalFavicon' not found in /path/to/sites/all/modules/favicon/favicon.module on line 68

Here's the output from a debug_backtrace() inserted at line 68 of favicon.module: http://pastebin.com/raw.php?i=fBdg1bHj

Note: I've edited the backtrace to replace my domain with example.com and my web root with /path/to.

morbiD’s picture

Further to my previous comment, I've managed to resolve this by first disabling favicon 7.x-1.0-rc2 in the modules list, then installing 7.x-2.1 and enabling it again.

Could it be something to do with the class autoloading system not picking up the new class files that were added to the .info file until you visit the modules list?

I note the following paragraphs from https://www.drupal.org/node/350780 :

"The registry is rebuilt when modules are enabled or disabled in order to incorporate new code or remove code from disabled modules. If you are developing new code with classes, make sure to rebuild the registry regularly so that new resources are incorporated."

"Under certain conditions a stale file registry can lead to errors that block access to a site. The Registry rebuild project provides tools to help address this problem."

Grabby’s picture

Issue summary: View changes

For what it’s worth, I got the same thing as @morbiD under the same circumstances and fixed it the same way.

deanflory’s picture

I too just got the same thing going from 1.x to favicon-7.x-2.1:

WSOD with

Fatal error: Class 'DrupalFavicon' not found in /.../sites/all/modules/favicon/favicon.module on line 68