I just upgraded to Features (2.x-dev 2012-Nov-08) and I am seeing a JS error in my console using Chrome 23:
Uncaught TypeError: Object #<Object> has no method 'dialog'
features.js:131 >> $('#features-info-file').dialog({
Firefox 16.0.2 sees a similar error:
TypeError: $("#features-info-file").dialog is not a function
/sites/all/modules/features/features.js?mdg2tm (line137)
[Break On This Error]
height: 480
I am pretty sure JQuery ui .dialog
is being called but it's not defined.
This happens with Seven as the admin theme but I also tried other admin themes and the same error. It seems to be more prevalent if you are not using the Overlay module. With Overlay on, you would not really notice too much but with it off, this error is breaking my admin menu. If I go to any other admin page on my site other than /admin/structure/features, I do not get the error and it's fine.
I had a look at the source of my admin pages and JQuery Ui dialog is not getting called so I tried a test and did this in template.php
drupal_add_library('system', 'ui.dialog');
under function seven_preprocess_html(&$vars)
.. and that fixed that error but then I get a new one:
TypeError: Drupal.settings.features is undefined
/sites/all/modules/features/features.js?mdg3kf
Line 148
... so I am not quite sure what is going on here.
Comment | File | Size | Author |
---|---|---|---|
#2 | features-issue.png | 124.94 KB | Danny Englander |
Comments
Comment #1
mpotter CreditAttribution: mpotter commentedI am not able to reproduce this. Features is including the ui.dialog library on line 155 of features.admin.inc:
Also using Chrome v23 here on the Seven admin theme, so not sure what else could be wrong. Tried it with both Overlay off and on. Makes me wonder if it's a jQuery UI version issue or something else site-specific. I do my testing on a clean install of Drupal 7.
I'll need other people to report on this.
Comment #2
Danny EnglanderHi thanks, I just did a brand new install of Drupal 7.17 and only enabled Features and I still get the error. (see attached) but you're right if no one else reports this, then it's some other strange issue with my setup.
Comment #3
mpotter CreditAttribution: mpotter commentedBah, nevermind, I was in an older version of Drupal. I see the same thing in 7.17. Hmm, makes me wonder what changed to cause this and when it changed. Let me look into this. But at least it is reproduced.
Comment #4
mpotter CreditAttribution: mpotter commentedAh, now I see what was wrong. I was looking on the wrong URL page. It was working fine in the Features Create/Recreate page. But was just throwing the error on the main Features listing page. I added some checks in the JS file to fix this and committed to c0b054d.
Comment #5
Danny EnglanderPerfect, I just grabbed the latest from the repo and the error is fixed. Thank you very much!