0

I'm using Drupal 7 and jQuery Update module set to jQuery version 1.8. I have a form. In it's definition I have:

$form['#attached']['library'] = array(
  array('system', 'ui.dialog'),
  array('aat_pc_product', 'product_form'),
);

In the behavior, I use:

if(!isFormValid) {
  $('<div>' + Drupal.t('Some fields was left blank even when not disabled. Either check "skip line" or fill missing data.') + '</div>').dialog({ modal: true });
}

return isFormValid;

Now, with good old alert it worked great. But when I try do use dialog, in chrome in my console I get:

Uncaught TypeError: Object function (a,b){return new p.fn.init(a,b,c)} has no method 'curCSS' jquery.ui.position.min.js?v=1.8.7:13

In FireFox it fails in similar way:

TypeError: c.curCSS is not a function ...his,"marginTop",true))||0,v=l+p+parseInt(c.curCSS(this,"marginRight",true))||0,w... jquery...v=1.8.7 (row 13)

Updating to dev version of jQuery Update and seelcting jQuery 1.9 or 1.10 does not help - it does not complain about curCSS, but about lack of $.browser() that was removed in jQuery 1.9, and deprecated long ago.

My question is: Am I doing something wrong, or it's a bug between jQuery Update and Drupal? And if it's a bug, is there any version of jQuery update without it?

Is there a way to update jQuery UI to make it match jQuery, without hacking jQuery Update module or updating directly in D:\UniServer\www\misc\ui ?

  • It'll probably be this: stackoverflow.com/questions/12048271/… – Clive Oct 28 '13 at 14:27
  • @Clive Good catch, it didn't occur to me it might be something so fundamental. – Mołot Oct 28 '13 at 14:30
  • Have you checked this link: drupal.org/node/1847900 – Ankit Agrawal Oct 28 '13 at 17:54
  • @AnkitAgrawal It was closed as a duplicate of an issue that's closed (fixed) too. But it does not work for me. That's why I was thinking I may be doing something wrong. Opened an issue in issue queue, but in the meantime I'm still looking for a way to hack it together. – Mołot Oct 29 '13 at 7:22
-1

when c.curCSS is not a function error occures ,just do the following if any two js included check and remove .. after add this into script

jQuery.curCSS = jQuery.css;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.