Hello,

When you create a menu entry with hook_menu or alter a menu using hook_menu_alter by specifying a theme callback, the applied jquery version is no longer compatible with the standard theme settings.

This happens when you want to use a path starting with admin/ on your site. For instance, I'm using these pathes to provide an adminsitration section to the content administrators.

I propose to enhance the following code in jquery_update.module

if (!empty($admin_version) && path_is_admin(current_path())) {
  if (version_compare($version, $admin_version, '!=')) {
    $version = $admin_version;
  }
}

by

global $theme;
$admin_theme = variable_get ( 'admin_theme' );
if (!empty($admin_version) && ($theme == $admin_theme) && path_is_admin(current_path())) {
  if (version_compare($version, $admin_version, '!=')) {
    $version = $admin_version;
  }
}

Currently, I'm updating every version update of jquery_update by replacing the code and it's working as expected for several months now on.

Mathias

Comments

mathiasmg created an issue. See original summary.

markhalliwell’s picture

Status: Active » Closed (won't fix)
Related issues: +#1969244: Specify jQuery version per theme

Things like this were one of the reasons the concept of an "admin" theme specific jQuery version was removed in 7.x-3.x in favor of this related issue.