We have a installation profile with quite some modules, which one of is date_api.
They are all dependecies in the profile.info file, so they get enabled before the profile can use hook_install and set the values and based on this you get this warning:

The Date API requires that you set up the site timezone and first day of week settings and the date format    [warning]
settings to function correctly.

Do you have any suggestions how to fix this in a custom install profile, or is there a way to fix this in date itself?

Comments

karens’s picture

Status: Active » Fixed

I haven't tried this, but that message means that the variables have not been set. If you set those variables you shouldn't get any message.

fgm’s picture

Priority: Normal » Minor
Status: Fixed » Active

Actually, date_api_install() does not check whether the variables are defined or not, but just emits this message whatever the situation.

Now, as dawehner said, this happens /before/ the profile hook_install() implementation has a chance to run and set these variables anyway, because it occurs in the dependency processing part. However, since this check is also performed in date_api_requirements(), it could probably be moved from date_api_install() to date_api_requirements('install')

karens’s picture

If someone provides a patch I could apply :)

karens’s picture

Status: Active » Postponed (maintainer needs more info)
steinmb’s picture

Category: Support request » Bug report
Priority: Minor » Normal
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active