I noticed that when submitting a contextual filter for a view via ajax, I was getting a fatal error saying that the function themekey_check_theme_enabled was not defined.
After inspecting the themekey.module file, the first condition of themekey_is_active is:
in_array('system', variable_get('themekey_compat_modules_enabled', array()))
My install never set the themekey_compat_modules_enabled to a value, so this always returned false, disabling the inclusion of themekey_base.inc:
require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'themekey') . '/themekey_base.inc';
which contains the themekey_check_theme_enabled function.
Can this value be set on install?
Comments
Comment #1
nbennett25 commentedComment #2
nbennett25 commentedNote that manually setting the themekey_check_theme_enabled to array('system') breaks the node edit layout.
Comment #3
mkalkbrennerYou need to read the complete expression:
(in_array('system', variable_get('themekey_compat_modules_enabled', array())) || !(variable_get('admin_theme', '0') && path_is_admin($_GET['q'])))It's absolutely OK and themekey_compat_modules_enabled has to be an empty array unless you install ThemeKey Compatibility module.
Please post the exact fatal error incl. line number and file and I will have a look.
Comment #4
nbennett25 commentedHere is the full ajax response:
Fatal error: Call to undefined function themekey_check_theme_enabled() in /[path]/sites/all/modules/contrib/themekey/themekey.module on line 446
Thanks for any help -
Comment #5
mkalkbrennerCan you verify the attached patch?
Comment #6
mkalkbrennerI assume that you selected the "Bypass a request forgery protection in theme selection for Ajax responses." option, right?
Comment #8
nbennett25 commentedYes - Bypass request forgery protection was enabled.
Confirmed - patch works for me - thanks!
Comment #9
mkalkbrenner