For some reason, Context UI stopped working when using Jquery Update 2.x, both versions, alpha and dev are not working. My current version of context is 3.0

Comments

nevets’s picture

Do you get a javascript error? I ask because I am using Content 3.0 and jQuery update 2.x without problem.

lelizondo’s picture

Yes, using Firefox's error console I get:

Error: uncaught exception: Syntax error, unrecognized expression: [@type="checkbox"]

Edit: Jquery UI version is 1.3.2 what's yours?

nevets’s picture

That is old code, the '@type' should be 'type', what file does the error occur in?
(I am also using jQuery 1.3.2)

lelizondo’s picture

No idea. It doesn't say. What do I do to know? and more important, how do I fix it?

nevets’s picture

Are you using firebug (a Firefox extension)? At least with firebug the error normally shows the line and file. Also with firebug the error message is usually click-able to show you where in the file the error is. If you can provide a link to the page I can take a look.

lelizondo’s picture

The page is in my localhost. Firebug reports no error, Firefox Error console reports that error but it doesn't say what file is causing it.

nevets’s picture

I would then search all .js files for @type. It does not appear to be a core issue so I would guess it's related to a module you have added so another approach is to disable them one at a time and see if the error goes away.

newtonpage’s picture

@lelizondo:

as others have mentioned, the '@type' syntax is legacy from jQuery 1.2 and was deprecated several years ago. This was used in certain DOM filter functions. If you have ensured that you are using jQuery 1.3.2 plus, then check the code in the Context UI js and change the syntax to current syntax. See: http://api.jquery.com/ and look for the functions that deal with selecting "attributes that contain" - for example: http://api.jquery.com/attribute-contains-selector/. I also suggest that you ping the module maintainers as this should be dealt with by them.

lelizondo’s picture

Thanks. I disabled my modules one by one and when I reached to jquery_update Context UI started working again so I guessed this module was the guilty one, but I don't know if other modules might be causing this.

Crom’s picture

I can confirm this problem. Please see here: http://drupal.org/node/995918

Crom

nedjo’s picture

Status: Active » Closed (duplicate)

The offending code does not appear in context module's js. It is caused by a different module, likely betterselect, see #510012: Not compatible with Jquery Update -- Breaks node edit page!. See also #806352: all collapsible fields broken.

lelizondo’s picture

Better select is a module I do use, I'll better try.

lelizondo’s picture

Confirmed, in my case, Better Select was breaking Context, not Jquery Update