Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
markhalliwellThings 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.