Upon updating the module while it is disabled, a call is done to apachesolr_multiligual_confgen_register_multilingual_variables() which is in the (unincluded) module file.

We get the following error:

PHP Fatal error: Call to undefined function apachesolr_multiligual_confgen_register_multilingual_variables() in modules/contrib/apachesolr_multilingual/apachesolr_multilingual_confgen/apachesolr_multilingual_confgen.install on line 46

Patch atttached

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stefan.r’s picture

Actually including in hook_disable should not be needed as the module is enabled there already.

mkalkbrenner’s picture

Status: Needs review » Fixed

https://api.drupal.org/api/drupal/modules!system!system.api.php/function...

The hook is called every time the module is enabled. It should be implemented in the module's .install file. The implementation can rely on the .module file being loaded.

So the include is only needed in the hook_update_N().

Committed to git:
http://drupalcode.org/project/apachesolr_multilingual.git/commit/6e584af

BTW I mentioned you as author:
[7.x-1.x fadf9c0] #2147927: Error message when running update hooks with disabled module stefan.r, mkalkbrenner: Error message when running update hooks with disabled module
Author: stefan.r
2 files changed, 4 insertions(+), 1 deletion(-)

I have no idea why this is not reflected on drupal.org git. Maybe an 7.x upgrade issue?

stefan.r’s picture

thanks.

Did you forget to push it perhaps? I don't see any commit fadf9c0 yet

mkalkbrenner’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit fadf9c0 on 7.x-1.x, 6.x-3.x authored by stefan.r, committed by mkalkbrenner:
    [#2147927] stefan.r, mkalkbrenner: Error message when running update...