Tested on OA 2.32
$ drush dl invite
$ drush pm-enable -y invite

Invite module is https://www.drupal.org/project/invite

PHP Fatal error: Class 'InviteTypeController' not found in /var/www/oa/includes/common.inc on line 7914
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Class 'InviteTypeController' not found in /var/www/oa/includes/common.inc, line 7914

On latest "normal" Drupal, it installs without any problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JKingsnorth’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

This doesn't sound like a bug in Open Atrium per sae, so I'm marking it as a support request.

It may be a bug in the Invite module that makes it incompatible with the patches that the OA distribution applies to certain modules.

So perhaps try installing Invite on vanilla Drupal, but with the patches applied to the ctools and entity modules that OA uses. A list of these patches can be found in the relevant module directories in the OA profile.

Drupaler at UN’s picture

Drupaler at UN’s picture

Status: Postponed (maintainer needs more info) » Active
Drupaler at UN’s picture

Status: Postponed (maintainer needs more info) » Active

Hi
I applied the core patches.
invite does install without error.

I f you can guide me in testing more.

JKingsnorth’s picture

It seems like this might be related to an issue that already is mentioned in the module's issue queue.

Have you tried installing the latest dev version of Invite instead?

Drupaler at UN’s picture

Yes, I did.
I can xdebug if you guide me a bit (I have no clue where to start to when doing an install):
here is the stack trace with the dev version

# drush pm-enable invite
The following extensions will be enabled: invite
Do you really want to continue? (y/n): y
PHP Fatal error:  Class 'InviteTypeController' not found in /var/www/drupal7/includes/common.inc on line 7914
PHP Stack trace:
PHP   1. {main}() /usr/share/pear/drush/drush.php:0
PHP   2. drush_main() /usr/share/pear/drush/drush.php:14
PHP   3. _drush_bootstrap_and_dispatch() /usr/share/pear/drush/drush.php:59
PHP   4. drush_dispatch() /usr/share/pear/drush/drush.php:90
PHP   5. call_user_func_array:{/usr/share/pear/drush/includes/command.inc:165}() /usr/share/pear/drush/includes/command.inc:165
PHP   6. drush_command() /usr/share/pear/drush/includes/command.inc:165
PHP   7. _drush_invoke_hooks() /usr/share/pear/drush/includes/command.inc:198
PHP   8. call_user_func_array:{/usr/share/pear/drush/includes/command.inc:324}() /usr/share/pear/drush/includes/command.inc:324
PHP   9. drush_pm_enable() /usr/share/pear/drush/includes/command.inc:324
PHP  10. drush_module_enable() /usr/share/pear/drush/commands/pm/pm.drush.inc:915
PHP  11. module_enable() /usr/share/pear/drush/commands/core/drupal/environment.inc:104
PHP  12. registry_update() /var/www/drupal7/includes/module.inc:481
PHP  13. _registry_update() /var/www/drupal7/includes/bootstrap.inc:3240
PHP  14. drupal_alter() /var/www/drupal7/includes/registry.inc:65
PHP  15. ctools_registry_files_alter() /var/www/drupal7/includes/module.inc:1101
PHP  16. _ctools_registry_files_alter() /var/www/drupal7/profiles/openatrium/modules/contrib/ctools/ctools.module:617
PHP  17. ctools_get_plugins() /var/www/drupal7/profiles/openatrium/modules/contrib/ctools/includes/registry.inc:33
PHP  18. linkit_entity_ctools_linkit_get_children() /var/www/drupal7/profiles/openatrium/modules/contrib/ctools/includes/plugins.inc:286
PHP  19. entity_get_info() /var/www/drupal7/profiles/openatrium/modules/contrib/linkit/plugins/linkit_search/entity.inc:36
PHP  20. drupal_alter() /var/www/drupal7/includes/common.inc:7748
PHP  21. invite_entity_info_alter() /var/www/drupal7/includes/module.inc:1101
PHP  22. invite_get_types() /var/www/drupal7/sites/all/modules/invite/invite.module:70
PHP  23. entity_load_multiple_by_name() /var/www/drupal7/sites/all/modules/invite/invite.module:539
PHP  24. entity_load() /var/www/drupal7/profiles/openatrium/modules/contrib/entity/entity.module:255
PHP  25. entity_get_controller() /var/www/drupal7/includes/common.inc:7878
Drush command terminated abnormally due to an unrecoverable error.                                                     [error]
Error: Class 'InviteTypeController' not found in /var/www/drupal7/includes/common.inc, line 7914

and here is the stack trace with the "stable" version: (it looks identical to me)

# drush pm-enable invite
The following extensions will be enabled: invite
Do you really want to continue? (y/n): y
PHP Fatal error:  Class 'InviteTypeController' not found in /var/www/drupal7/includes/common.inc on line 7914
PHP Stack trace:
PHP   1. {main}() /usr/share/pear/drush/drush.php:0
PHP   2. drush_main() /usr/share/pear/drush/drush.php:14
PHP   3. _drush_bootstrap_and_dispatch() /usr/share/pear/drush/drush.php:59
PHP   4. drush_dispatch() /usr/share/pear/drush/drush.php:90
PHP   5. call_user_func_array:{/usr/share/pear/drush/includes/command.inc:165}() /usr/share/pear/drush/includes/command.inc:165
PHP   6. drush_command() /usr/share/pear/drush/includes/command.inc:165
PHP   7. _drush_invoke_hooks() /usr/share/pear/drush/includes/command.inc:198
PHP   8. call_user_func_array:{/usr/share/pear/drush/includes/command.inc:324}() /usr/share/pear/drush/includes/command.inc:324
PHP   9. drush_pm_enable() /usr/share/pear/drush/includes/command.inc:324
PHP  10. drush_module_enable() /usr/share/pear/drush/commands/pm/pm.drush.inc:915
PHP  11. module_enable() /usr/share/pear/drush/commands/core/drupal/environment.inc:104
PHP  12. registry_update() /var/www/drupal7/includes/module.inc:481
PHP  13. _registry_update() /var/www/drupal7/includes/bootstrap.inc:3240
PHP  14. drupal_alter() /var/www/drupal7/includes/registry.inc:65
PHP  15. ctools_registry_files_alter() /var/www/drupal7/includes/module.inc:1101
PHP  16. _ctools_registry_files_alter() /var/www/drupal7/profiles/openatrium/modules/contrib/ctools/ctools.module:617
PHP  17. ctools_get_plugins() /var/www/drupal7/profiles/openatrium/modules/contrib/ctools/includes/registry.inc:33
PHP  18. linkit_entity_ctools_linkit_get_children() /var/www/drupal7/profiles/openatrium/modules/contrib/ctools/includes/plugins.inc:286
PHP  19. entity_get_info() /var/www/drupal7/profiles/openatrium/modules/contrib/linkit/plugins/linkit_search/entity.inc:36
PHP  20. drupal_alter() /var/www/drupal7/includes/common.inc:7748
PHP  21. invite_entity_info_alter() /var/www/drupal7/includes/module.inc:1101
PHP  22. invite_get_types() /var/www/drupal7/sites/all/modules/invite/invite.module:70
PHP  23. entity_load_multiple_by_name() /var/www/drupal7/sites/all/modules/invite/invite.module:539
PHP  24. entity_load() /var/www/drupal7/profiles/openatrium/modules/contrib/entity/entity.module:255
PHP  25. entity_get_controller() /var/www/drupal7/includes/common.inc:7878
Drush command terminated abnormally due to an unrecoverable error.                                                     [error]
Error: Class 'InviteTypeController' not found in /var/www/drupal7/includes/common.inc, line 7914
JKingsnorth’s picture

Project: Open Atrium » Invite
Version: 7.x-2.32 » 7.x-4.x-dev

Looks like the linkit module is trying to hook in to the process as well. Perhaps try installing in your steup in #2 but with the linkit module enabled? OA uses linkit 3.3 (unpatched)

I haven't been able to reproduce this on simplytest.me, but it might be worth a shot.

Still not convinced this is an Open Atrium issue, so I'm going to move it to the Invite module's issue queue, maybe they will have a better idea.

mpotter’s picture

Status: Active » Closed (cannot reproduce)

Yes, this needs to move over to the Invite issue queue. Nothing else we can do here.

JKingsnorth’s picture

Status: Closed (cannot reproduce) » Active

We're in the other queue now, so let's see if the Invite maintainers can help.

ckng’s picture

Status: Active » Postponed (maintainer needs more info)

It is not clear what version of Invite you are trying to install.
Version: ?

Are you doing fresh install or upgrade from older version?
Based on your comments, the conclusion I'm getting is "invite does install without error". So not sure how we could help.

B-Prod’s picture

I have the same issue using a Panopoly distribution.

I tried to install the module with Drush, but it failed with the same message.

It seems that it is caused by a specific configuration, where Entity Translation is enabled.
The following modules, working together, make the error occur at bootstrap time (when calling drupal_path_initialize):
Redirect (patched with a merge to global redirect)
Entity Translation
Invite

The call to path_is_admin() from the Redirect module leads to a call to entity_translation_admin_paths() (called by path_get_admin_paths()).

This needs to load the entity info, and especially the invite type (invite_get_types() called by invite_entity_info_alter()). This is where it goes bad: the registry is not rebuilt at this time, so it fails.

Solution for disabling the Invite module and get the site back: disabling the Invite module from the system table and rebuilding the registry with drush and Registry Rebuild.

So the problem is not the fact of Invite, but caused by the way Drupal handle the classes autoload.

Solution: make Invite use the PSR-4 and rely on X-Autoload...

B-Prod’s picture

If you really want to use the Invite module, you will need to force the registry to discover the required classes.

SQL Query:

INSERT INTO `registry` VALUES
('InviteMetadataController', 'class', 'sites/all/modules/invite/includes/invite.info.inc', 'invite', 0),
('InviteController', 'class', 'sites/all/modules/invite/includes/invite.controller.inc', 'invite', 0),
('InviteTypeController', 'class', 'sites/all/modules/invite/includes/invite.controller.inc', 'invite', 0),
('InviteTypeUIController', 'class', 'sites/all/modules/invite/includes/invite.controller.inc', 'invite', 0),
('Invite', 'class', 'sites/all/modules/invite/includes/invite.controller.inc', 'invite', 0),
('InviteType', 'class', 'sites/all/modules/invite/includes/invite.controller.inc', 'invite', 0);

Then you have to rebuild the registry with Drush and Registry Rebuild:
drush rr

ckng’s picture

I've seen similar issue but with Panopoly and Feeds. What B-Prod says - remove the offending module temporary, rebuild registry, restore the offending module solved it.

Please try the solution proposed to see if it solves your problem.

SocialNicheGuru’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
994 bytes

class loading was not working during install

I added the needed files to the .module file.

I also added two to the .info file

I do not have xautolad enabled

SpartyDan’s picture

Status: Needs review » Postponed (maintainer needs more info)

@SocialNicheGuru

Please include details of your install. Are you using OA or Panopoly?

Do you encounter the same error on a fresh install of Drupal?

I cannot reproduce the error on a fresh install of Drupal 7.51.