If ThemeKey gets installed by the install profile then you get all those annoying warnings in dblog about undefined constants during installation all the time.

I am just wondering why you're not defining the constants at the top of themekey.module without any conditions? At least that's the case for almost all other modules and only themekey tries to define those constants only when really really needed - or even less often ;-)

CommentFileSizeAuthor
#2 1252846.patch2.63 KBmkalkbrenner

Comments

mkalkbrenner’s picture

I am just wondering why you're not defining the constants at the top of themekey.module without any conditions?

Good question. I can't remember where it was documented for Drupal 6 to define constants in hook_init(), but this was the reason for the current code base. Due to the fact that hook_init() is not called during installation we define the required constants at many places.

But it seems that defining the constants the natural way at the top of a file is best way and absolutely ok for D7.

mkalkbrenner’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Assigned: Unassigned » mkalkbrenner
Status: Active » Fixed
StatusFileSize
new2.63 KB
jurgenhaas’s picture

Looking good. Thanks.

Status: Fixed » Closed (fixed)

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