Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Seeing the following error on first installing oauth_common. autoload and inputstream modules were already installed without error.
Fatal error: Class 'OAuthCommonHooks' not found in /drupal-6.13/sites/all/modules/oauth_common/oauth_common.module on line 58
environment:
MySQL 5.0.51a
PHP 5.2.4-2ubuntu5.5
Drupal 6.13
autoload 6.x-1.3
inputstream 6.x-1.0
oauth_common 6.x-1.0-beta3
Comments
Comment #1
xolotl CreditAttribution: xolotl commentedis the problem here the same mentioned in this autoload module issue?
http://drupal.org/node/359147
would it be as simple as renaming the include files to load in an alphabetical order that matches their dependencies?
Comment #2
Hugo Wetterberg CreditAttribution: Hugo Wetterberg commentedHi Xolotl,
This has something to do with cache clearing. I'll take a closer look at this, but for now, just clear your cache.
/Hugo
Comment #3
xolotl CreditAttribution: xolotl commentedYou were right. I was able to avoid the error by manually deleting a record from the cache table with a cid of "autoload:" after I had enabled the oauth_common module and encountered the error. Sorry I don't have more info.
Comment #4
RobLoachHugo, what are your thoughts on merging in the class hooks into the .module file?
Comment #5
Hugo Wetterberg CreditAttribution: Hugo Wetterberg commentedDo you mean skipping the dependency on the autoload module? It looks like it's either that or to programmatically flush the autoload cache entry when the module is enabled. It's just that autoload is such a nice thing to have, thank god that this problem will go away with the code registry.
I've taken a look at this again, and it should probably be solved by adding:
This should probably be done by all modules that use the autoload module.
Comment #6
Hugo Wetterberg CreditAttribution: Hugo Wetterberg commentedOk, update has been committed to CVS and will show up in the dev snapshot.
Comment #7
xolotl CreditAttribution: xolotl commentedLooks like success! I did not encounter the error upon installing the 6.x-1.0-beta4 version. I did have to disenable and reenable the oauth_common module to avoid the error.
Comment #8
Hugo Wetterberg CreditAttribution: Hugo Wetterberg commentedComment #10
smelliott CreditAttribution: smelliott commentedSorry, I installed 6.x-1.0-beta4 and I still get this error.
Drupal 6.13
autoload 6.x-1.3
inputstream 6.x-1.0
oauth_common 6.x-1.0-beta4
Class 'OAuthCommonHooks' not found in /public_html/sites/all/modules/oauth_common/oauth_common.module on line 60
Comment #11
kehan CreditAttribution: kehan commentedAfraid I'm also getting this - apologies for issue spamming - I'm just upgrading my various services to the latest services and friends modules - love the principal of everything here I must say especially granular access control for individual service methods.
I've also been using drush (a lot), and #547736 indicates that autoload doesn't work when being called from the CLI.
Comment #12
valkum CreditAttribution: valkum commentedhe wrote that he put this in dev snapshot ;) try the dev version.
Comment #13
kehan CreditAttribution: kehan commentedApologies - it was actually #547736: Autoload fails with drush, and a need for clearing the cache.
Comment #14
kehan CreditAttribution: kehan commentedI have discovered that both the 6.x-1.x-dev build and the 6.x-1.0-beta4 build break drupal database updates.
The version from October 12th on github however works fine - I think there has been some refactoring as autoload wasn't working for drupal hooks like hook_user and hook_menu.
Anyway to fix the issues use the version available at:
http://github.com/hugowetterberg/oauth_common
Comment #15
Hugo Wetterberg CreditAttribution: Hugo Wetterberg commentedThis is fixed in the current release.