Closed (fixed)
Project:
Drupal Commons
Component:
Theme
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2013 at 00:14 UTC
Updated:
22 Apr 2013 at 18:10 UTC
Here is the console message in Chrome,
Uncaught TypeError: Object #<Object> has no method 'on' jquery.formalize.min.js:1
See screenshot below for an example of the issue.
| Comment | File | Size | Author |
|---|---|---|---|
| Screen Shot 2013-01-24 at 4.11.43 PM.png | 13.83 KB | damontgomery |
Comments
Comment #1
matt v. commentedThis appears to be an issue with the 1.4.4 version of jQuery that comes with Drupal 7 by default. I tested that theory by adding the latest 7.x-2.3-alpha1 version of the jQuery Update module. That most recent version of the module allows you to choose between multiple versions of jQuery. Switching to jQuery 1.5.1 did not make the error go away, but jQuery 1.7.7 and 1.8.2 did.
In my experience, adding jQuery update introduces some problems of its own. An alternative would be to work with the Formalize project to help make Formalize backwards compatible. Another (possibly less ideal) option would be to see if earlier versions of Formalize might work.
Comment #2
matt v. commentedIt looks like the issue stems from the fact that the on() method was added in jQuery 1.7.
I went ahead posted a request in the Formalize issue queue to see about the possibility of making Formalize backwards compatible.
Comment #3
ryanrain commentedtheming of the exposed filters on the commons_homepage_content view also break without jquery update. http://drupal.org/node/1897998
Comment #4
ezra-g commentedCan folks identify a specific reason not to simply restore jQuery update and run 1.7.7?
Comment #5
matt v. commentedI recently ran into issues with Views on a non-Commons site where I was testing out the jQuery Update module. Looking through the Views issue queue now, some of those issues may have been worked through, but apparently not all of them. The Panels UI seems to have similar issues.
That said, using jQuery Update may still be the prudent thing to do.
Comment #6
ay13 commentedi updated the formalize js and pushed to the commons origins theme. the problem should be fixed now, re-open if it is not.
Comment #7
ezra-g commentedThe related commit referenced in #6: http://drupalcode.org/project/commons_origins.git/commitdiff/936dbda?hp=...
Comment #9
Nathan Smith commentedOkay, I've added a separate "jquery.formalize.legacy.js" file that's compatible with jQuery 1.4.4…
https://github.com/nathansmith/formalize/blob/master/assets/js/jquery.fo...
Comment #10
ryanrain commentedit looks like nathan's work still needs to be committed to the theme. i'm seeing this error abort theme js in ie9.
Comment #11
Zarabadoo commentedOr buttons are a bit too stylized to work completely with Formalize, and it provided a bunch of legacy support for other browsers that are not supported. So i have rolled in what works (with attribution) and removed the parts that were excessive for this theme's needs. This was all done in the button rework in #1954406.