I just installed the A3 Atlantis theme with the Admin module and I noticed there's a Javascript error on the block admin page:

 Uncaught TypeError: Object function (a,b){return new D.fn.init(a,b)} has no method 'cookie'
/sites/all/modules/contrib/admin/includes/admin.toolbar.js?L:140

This causes the Admin module to become unusable, if you click on the spanner the admin menu doesn't appear and the block page is also unusable click and drag works but when you save the page the region location for the blocks doesn't save.

Comments

pablov2’s picture

me too #690212

yhahn’s picture

Project: Admin » A3 Atlantis
Version: 6.x-2.0-alpha5 » 6.x-1.2
Status: Active » Needs review

I've looked into this and it appears to be due to this additional call of drupal_add_js() in the template.php of A3 Atlantis:

// We need jQuery included on all admin pages.
if (arg(0) == 'admin') {
  drupal_add_js('misc/jquery.js');
}

I'm not quite sure why this is necessary, you'll see that drupal_add_js() adds jquery.js by default anyway. An easy way to fix this is to simply remove this code or replace it with:

// We need jQuery included on all admin pages.
if (arg(0) == 'admin') {
  drupal_add_js('misc/jquery.js', 'core');
}
AlexisWilke’s picture

Title: Javascript error on the "A3 Atlantis" theme block page » Javascript error on all Admin pages (and the "A3 Atlantis" theme block page)
Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

Hi Yhahn,

Wow! I searched for the problem for 3h. In my case it broke the Views AJAX API. I could just not use the cool Views functionality.

Your fix was the answer to the problem.

I think that they need that include because in some cases no JavaScript is included. When you have nearly no module. But including it twice is definitively a no-no.

Thank you for the fix!
Alexis Wilke

P.S. see cross post on the Views issue queue: #806696: AJAX failing by returning AJAX output

AlexisWilke’s picture

Issue tags: +jQuery, +Ajax

Wanted to tag this too.