Adminimal module is loading an extra jquery.min.js file (version 1.7.2). I'm already loading jQuery 1.8. Similar issue is posted here: https://www.drupal.org/node/2465471 however this is closed and propose to use a solution posted in JQuery website, which is not so factible.
The proposed solution (patch) is to remove jquery.min.js from the adminimal module, and patch any calls to that particular version in the module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexito created an issue. See original summary.

afsch’s picture

Status: Needs review » Needs work

The last submitted patch, 2: adminimal_admin_menu-duplicated_jquery-2680447-1-7.patch, failed testing.

afsch’s picture

afsch’s picture

  • ANDiTKO committed 22bca0a on 7.x-1.x authored by alexito
    Issue #2680447 by alexito: Adminimal menu including duplicate jquery.min...
energee’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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

achton’s picture

I don't think the commit attributed to this issue is correct: http://cgit.drupalcode.org/adminimal_admin_menu/commit/?id=22bca0a1025be...

It does not contain anything remotely similar to the patch in this issue. @ANDITKO, can you check again what is going on here?

kyletaylored’s picture

Though pointed out in #9 that the patch here wasn't actually committed in the listed commit, the patch did in fact make it in, but there's still a bug.

The problem is that even though the default should be "don't add jQuery until we need it", you have to first enable a variable to create it, and then disable it to return false. This means that on a fresh install of Adminimal Admin Menu, you will always have jQuery added twice unless you enable and disable the jQuery setting.

// line 34
// The problem is that the variables by default are set to TRUE.
// So if you never enabled/disabled 'adminimal_admin_menu_jquery', it will always be TRUE
$load_slicknav = variable_get('adminimal_admin_menu_slicknav', TRUE );
$load_jQuery = variable_get('adminimal_admin_menu_jquery', TRUE );

// Check if both slicknav and custom jQuery must be loaded.
  if ($load_slicknav and $load_jQuery) {
    drupal_add_js($path . '/js/jquery.min.js', array( 'type' => 'file', 'scope' => 'header', 'weight' => 888 ));
    drupal_add_js($path . '/js/slicknav/jquery-no-conflict.slicknav.js', array( 'type' => 'file', 'scope' => 'header', 'weight' => 888 ));
    drupal_add_css($path . '/js/slicknav/slicknav.css');
  }
Samvel’s picture

Problem still not fixed, when varaibles

$load_slicknav = variable_get('adminimal_admin_menu_slicknav', TRUE );
$load_jQuery = variable_get('adminimal_admin_menu_jquery', TRUE );

enabled. And they still enabled by default. It looks like they disabled by default, but it's bug, patch to fix it #2513970-7: Don't use the string 'TRUE' as a boolean

kyletaylored’s picture