If your site is not running in multilingual mode themekey will generate the following notice:

Notice: Use of undefined constant LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX - assumed 'LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX' in themekey_match_path() (regel 93 van [..]/sites/all/modules/themekey/themekey_base.inc).
Notice: Use of undefined constant LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX - assumed 'LOCALE_LANGUAGE_NEGOTIATION_URL_PREFIX' in themekey_match_path() (regel 94 van [..]/sites/all/modules/themekey/themekey_base.inc).

This makes sense, because locale.inc will not be loaded.
http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupa...

Possible solution: an extra check near line 93 for drupal_multilingual(); will remove the notices.

CommentFileSizeAuthor
#2 1598752.patch716 bytesmkalkbrenner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkalkbrenner’s picture

I'll take a closer look at this.

http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupa... conditionally includes language.inc, not locale.inc.

local.inc is included in several places across the core.

mkalkbrenner’s picture

Status: Active » Needs review
FileSize
716 bytes

drupal_multilingual() seems to be a valid solution.

jadwigo’s picture

Status: Needs review » Reviewed & tested by the community

Now that you mention it, it does indeed call language.inc
I was checking through bootstrap and drupal_language_initialize() seemed like a logical place for locale.inc

Anyway, I've tested the patch, it applies and the notice is gone - so it works here.

mkalkbrenner’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the feedback. ThemeKey 7.x-2.2 will be released now.

Status: Fixed » Closed (fixed)

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