I'm trying to write my own installation profile adding the Amazon module in the dependencies within profile_name.info file
e.g.
dependencies[] = amazon
dependencies[] = amazon_store

The problem is that during profile installation, the Amazon module throws an error:

The specified database connection is not defined: default

when it reaches the Verify requirements task. However, when I try to remove Amazon module within the dependencies list, it installs successfully. I believe the problem lies within the Amazon module.

CommentFileSizeAuthor
#5 amazon.hook_requirements_fix.patch850 bytesrfay

Comments

rfay’s picture

Category: bug » support
Priority: Critical » Normal

No, this is a problem with your install profile. I don't know much about install profiles to help you.

eclipsegc’s picture

It is quite possible that your hook_requirements is killing the profile. Services module actually does a db call right there, and causes the same issue, I'm not 100% sure, but if commenting out the hook_requirements fixes the issue, you've found your culprit.

rfay’s picture

Thanks, EclipseGC. @DrupalRevisited, we look forward to your results.

rfay’s picture

Title: Installation profile error: The specified database connection is not defined: default » hook_requirements('install') inappropriately uses database
Category: support » bug
Priority: Normal » Major

So according to DamZ, hook_requirements('install') *cannot* use the database, and a variable_get() does, of course.

So we need to improve hook_requirements.

rfay’s picture

Status: Active » Fixed
StatusFileSize
new850 bytes

This patch should solve the problem.

Committed to D7: 9ea1808
And to D6: 7016a16

Status: Fixed » Closed (fixed)

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