If the update module is installed during Drupal installation, then the call top update_requirements('install') makes the whole installation to fail because it doesn't return anything and then array_merge() in line 957 of install.inc fails.

We should at least return array().

CommentFileSizeAuthor
#3 684828-3.update-fix-install.patch906 bytesdww
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dww’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

I've installed D7 HEAD about 500 times, always with the checkbox to enable update.module selected, and I've never seen a problem. Can you provide more details on how to reproduce the problem you're seeing?

Thanks,
-Derek

jurgenhaas’s picture

Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Active

Just put a dependencies[] = update into the .info file of your install profile. That will cause drupal_check_profile() to call update_requirements('install') in line 957 of install.inc and that will return NULL from that routine so that array_merge() fails.

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review
FileSize
906 bytes

Eeek, thanks. I can reproduce that now. Note, it's kinda pointless to do this, since the core installer already adds a question about if you want the Update manager enabled by default during install. But yes, we should still fix this. Attached patch is working fine with my testing. Of course, since our testing framework can't really test the installer, there's no good way to automate this test, but it's trivial to see the bug following the instructions in #2, and this obviously fixes it.

chx’s picture

Status: Needs review » Reviewed & tested by the community

oh duh. someone wants to check every other module?

dww’s picture

"someone wants to check every other module?"

Just grepped and checked. This is the only one, so we're good.

Side note: I wish core wasn't so fragile in places like this, but I'll probably be ridiculed again for wanting to "babysit broken code" and accused of favoring bloat. ;)

jurgenhaas’s picture

Looks good, thanks.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

Status: Fixed » Closed (fixed)

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