Install of current dev (from 8/24) on fresh install fails:

PHP Fatal error:  Call to undefined function mongodb() in sites/all/modules/mongodb/mongodb.install on line 42

Looks like mongodb.install was improved recently and now includes a call to mongodb() in hook_requirements(). However, before the module is installed, Drupal does not include mongodb.module. Therefore, mongodb() is still undefined.

Will attach a patch momentarily that uses the same strategy found at the top of mongodb_watchdog.module.

Comments

majorrobot created an issue. See original summary.

majorrobot’s picture

Status: Active » Needs review
StatusFileSize
new282 bytes

Here's the patch.

tempo22’s picture

yes, this patch fix the module install.

fgm’s picture

Status: Needs review » Needs work
StatusFileSize
new1.3 KB

It's a bit too violent for me : we should only do this if needed, I think, and it was missing a test. Here is a test showing the bug by failing.

fgm’s picture

We actually have a similar problem with uninstalling the mongodb_watchdog module when mongodb module has been disabled. Adding a test too.

fgm’s picture

StatusFileSize
new4.51 KB

And here are the two failing tests.

fgm’s picture

Status: Needs work » Needs review
StatusFileSize
new5.27 KB
new814 bytes
new1.02 KB

And the complete series with the fixes, as three separate patches:

  1. failing test
  2. fix mongo enable
  3. fix mongo_watchdog uninstall with mongo disabled

This seems good to me. If anyone care to review ?

  • fgm committed 2fb42af on 7.x-1.x
    Issue #2567211 by fgm, majorrobot: WSOD on enabling mongodb and...
fgm’s picture

Title: Mongodb.install should include mongodb.module » WSOD on enabling mongodb and uninstalling mongodb_watchdog
Status: Needs review » Fixed

Committed to 7.x-1.x, thanks.

Status: Fixed » Closed (fixed)

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