When hovering links in the Views UI with 1.8 enabled, I get this error:

Uncaught Error: Syntax error, unrecognized expression: #views-display-menu-tabs.not(.views-ui-render-add-view-button-processed-processed) li.add

which in turn breaks the modals in Views so the UI becomes useless. Going back to 1.7 works around the problem.

#24 1802198.patch961 bytesdrumm
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es).
[ View ]
#19 views-ui_break_with_jq1.8-1802198-19.patch1.08 KBhswong3i
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es).
[ View ]
#5 views-update_to_jquery_18-1802198-6689452.patch831 byteswestwesterson
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-update_to_jquery_18-1802198-6689452.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]


markcarver’s picture

Might have to do with 1.8's new Sizzle selectors. I tried finding the JS in Views to see if some code needed to be reworked, but didn't find anything. Per this issue #1494860: Views Rewrite Results UI Broken using JQuery 1.7 perhaps the issue lies with CTools?

Lux Delux’s picture

Well in the previous dev release, with just replacing the version numbers (inside the module's google cdn path settings) to the latest jquery and jquery ui, everything worked fine. So might be a clue somewhere in that?

michaelgc’s picture

Version:7.x-2.x-dev» 7.x-2.3-alpha1
Assigned:Unassigned» michaelgc

I'm also getting this error, even after I forced the .module file to use jQuery UI 1.8.23 instead of 1.8.11, and cleared all site/view caches. Could be CTools-related.

LobsterJonn’s picture

I found a fix that worked for me.

in views/js/views-admin.js line 261 replace

$('li.add', $menu)

There might be better ways to do it, but I don't have the time to do more about it now.
The problem seems to be an incompatibility with jQuery.once and the new Sizzle (just speculating because I know nothing of it)

Changing the version number for jQuery UI fixed another problem for me in Views UI regarding the function curCSS.

westwesterson’s picture

Status:Active» Needs review
new831 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch views-update_to_jquery_18-1802198-6689452.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

I created a patch for the views module including changes by lobsterJonn.
Can someone test to see if after this change views still works with default drupal 7 jquery version? If it does maybe we can push this change to the views issue queue.

jghyde’s picture

I just tested this. manually patched to the green prod version of views. The modal windows are still horked and the console says:

Timestamp: 11/6/12 5:02:23 PM
Error: Error: Syntax error, unrecognized expression: #views-display-menu-tabs.not(.views-ui-render-add-view-button-processed-processed) li.add
Source File: http://sandbox/sites/all/modules/jquery_update/replace/jquery/1.8/jquery.min.js?v=1.8.2
Line: 2

jQuery Update to 1.8.2

westwesterson’s picture

Status:Needs review» Needs work

I've tested this more since I posted the patch. Does not fully work with jQuery 1.8. It appears the JSON being returned is not being parsed.

mrded’s picture

Version:7.x-2.3-alpha1» 7.x-2.x-dev

I got same error on dev version of module.

airstarh’s picture

The same

zmove’s picture

Same, views UI is broken ith jquery 1.7 or 1.8, for example when you check a checkbox, it does not display additionnal options.

The dev version become quite old, is it still maintained ?

DriesP’s picture

Same problem....

bastnic’s picture

kmonty’s picture

Project:jQuery Update» Views
Version:7.x-2.x-dev» 7.x-3.5
Assigned:michaelgc» Unassigned

Moving this issue to Views, as this isn't an issue with the jquery_update project's code.

vinoth.3v’s picture

Title:Views UI breaks with jQuery 1.8 (unrecognized expression: #views-display-menu-tabs.not)» Views UI breaks with jQuery 1.8
Version:7.x-3.5» 7.x-3.x-dev
Priority:Normal» Major
Status:Needs work» Active

Any update?

I am getting plain ajax response displayed in browser when submitting form in Views admin UI

maxilein’s picture

me too. :-( Same with jQuery 1.7.
Had to revert to 1.5 ...

dawehner’s picture

http://drupal.org/node/1802198#comment-6915294 seems to be an okay workaround. You could even use admin/structure/views as path to be more detailed.

smk-ka’s picture

I am getting plain ajax response displayed in browser when submitting form in Views admin UI

Please be aware that in order to fix this bug you'll need to also apply #1847900: Update jQuery UI to 1.8.24, since the version of jQuery UI shipped with the jQuery Update module is incompatible with jQuery. If you apply both, it should work fine.

vinoth.3v’s picture


Thank you

hswong3i’s picture

Status:Active» Needs review
new1.08 KB
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es).
[ View ]

Double confirm with latest jquery_update in 1.8 + UI patch for 1.10 + views 7.x-3.x-dev, apply patch from #5 can solve the error message which figure out from Firebug.

Patch recreate by following commands:

git format-patch drupal/7.x-3.x -M -C -s --keep-subject --stdout > ~/views-ui_break_with_jq1.8-1802198-19.patch
dawehner’s picture

Did you tested it also without jquery 1.8?

hswong3i’s picture

Tested with jquery_update disabled, no error reported from Firebug ;-)

eclecto’s picture

The latest dev version of jQuery Update has a workaround for issues like this, allowing you to choose a different version of jQuery for admin pages than for your frontend.

It doesn't solve the problem, per se, but it could save you from having to patch Views until there's a new commit.

markcarver’s picture

I know jquery_update put in a solution for this, which does temporarily "fix" this problem. But ultimately I don't want to have to choose an outdated version of jQuery for admin just because it breaks Views. Views needs to be patched to work with jQuery 1.8.

drumm’s picture

new961 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es).
[ View ]

.live() is deprecated in jQuery 1.8, so we should go ahead and replace it with .delegate(), which was added in jQuery 1.4.2. Drupal 7.21 has jQuery 1.4.4.

I've tested the attached patch with jQuery 1.8.2, as installed by jquery_update. As far as I know, what to test for is

  1. Click +Add in the Displays area.
  2. A menu of display types should pop down.
  3. It should close if the mouse leaves the add button and that menu.
drumm’s picture

Assigned:Unassigned» drumm
drumm’s picture

Issue tags:+portland2013, +da-drupalcon

(Adding a couple tags since we ran into this on the portland2013.drupal.org. I've deployed #24 there, see #1946282: Admin view of DrupalCon Portland being horribly buggy and disobedient .)

dawehner’s picture

Status:Needs review» Fixed

I still try to figure out why jquery changes it's APIs so often :)
Delegate is a really nice way to solve it! Thanks.

Committed and pushed to 7.x-3.x

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

robertgarrigos’s picture

Issue summary:View changes
Status:Closed (fixed)» Needs work

I'm having this error with views 7.3.7, and dev also, six months later with jQuery 1.8. Modal windows keep braking.

drumm’s picture

Assigned:drumm» Unassigned

I am not actively working on this.

dawehner’s picture

Seriously someone should port the views JS and bring it into the jquery update module project. Contrib code also can't deal with php 6 yet.

idebr’s picture

In the latest jquery_update dev release, there is an option to use an older version of jQuery for administrative pages. Relevant issue: #1524944: Allow different version for administrative pages

deryck.henson’s picture

Title:Views UI breaks with jQuery 1.8» Views UI breaks with jQueryUI 1.8.2
Status:Needs work» Fixed
Issue tags:+jquery_update, +jqueryUI, +jQuery

Fixing it:

Set the source in jQuery Update settings to ANYTHING except the jQuery CDN. No matter the combo, jQuery CDN is refusing to load anything but UI 1.8.2. Once the source is changed (to Google, Microsoft or even NONE - both compressed and full sources), jQueryUI 1.10.2 is loaded, even if jQuery < 1.10 is selected.

Now everything works as expected, with jQuery 1.7, 1.8, 1.9 and 1.10.

Contrary to what #13 claims, this was actually a jQuery Update issue (seen here), not Views. However, since Views seems to be the most affected (because it's also the most used) module, I'm not moving it so others can see it here.

Status:Fixed» Closed (fixed)

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