Title says it all. In the current Views 3 (RC1 and 3.x-dev) code, Views uses drupal_add_js() to add jquery.ui.dialog.patch.js. This is wrong, because this (probably unintendedly) adds the .js file to all pages. This is clearly bad for WPO. (I know that views_ui should be disabled on production sites, but that doesn't make this a non-issue.)

The attached one-line patch fixes this. It's easy to test, too: 1) apply the patch, 2) if the jQuery UI dialogs still work, then it works :)

CommentFileSizeAuthor
dont_blindly_load_js.patch634 byteswim leers

Comments

dawehner’s picture

Status: Needs review » Fixed

The admin code itself seems to attach the library js:

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

So the patch makes perfect sense. Thanks!

Commited to the 7.x-3.x branch.

wim leers’s picture

Hurray :)

Any idea when the next stable will be tagged?

dawehner’s picture

Not really sure at the moment, because there are quite some issues which should be fixed ... but this might be to much perfectionism.

I think it makes sense to have at least one other release candidate.

wim leers’s picture

My bad — I actually meant another RC. I meant to stay "another tag", but said "another stable".

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