...or some combination like this :-/
Basically, the last bit of Javascript in og_menu.js seems to throw Internet Explorer 7/8/9 for a loop (causing two errors as described in #1051454: Attached JS file causes JS errors in IE 7, 8, 9), and this causes a few odd behaviors to happen on node add/edit forms. First, the WYSIWYG editor won't attach to the body field anymore, and second, some of the buttons in FileField fieldsets were displaying funny.
This bug only affects IE 7/8/9, and simply commenting out these lines in og_menu.js fixed the problem (with no ill effect) for me (while leaving jQuery Update 2.x, WYSIWYG, and WYSIWYG Force Linebreaks enabled):
// if ($('.og-audience:checkbox').size()) {
// $('.og-audience:checkbox').change(toggleCheckboxes).ready(toggleCheckboxes);
// }
It seems to me that that entire portion of the JS code seems a little hackish—but I'm not JS expert, so I'm out of my league in trying to fix it. For most nodes on my particular site, there's only one group audience, so there are no checkboxes, and no list of selectable groups, just a little display of the group the post is in. Therefore the error: 'undefined' is null or not an object.
I'm wondering if this code could be cleaned up in such a way as to resolve this bug, plus the one in #993518: JS Error when Audience becomes a Select.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | og_menu-js-10515420-11.patch | 693 bytes | mpotter |
| #3 | 1051542_jquery_update_safe.patch | 1.07 KB | aidanlis |
Comments
Comment #1
jide commentedThanks, I'll have a look at this.
Comment #2
aidanlis commentedAnd this line:
if ($('.menu-title-select option[value='+originalParent+']')) {
Should be:
if ($('.menu-title-select option[value="'+originalParent+'"]')) {
Comment #3
aidanlis commentedSo in jQuery > 1.3, when you do .attr('checked', '') it's the same as .attr('checked', 'checked') ... what we really want is removeAttr. I've attached a patch which fixes this.
The symptoms of this are the "Delete this menu item." box being checked by default.
Comment #4
erez111 commentedThis is a mandatory patch.
I had the exact same problem, not only with ie browsers and I found out the same solution.
Adding both '"' solves the javascript error.
Replace class removal method, is fine.
Comment #5
erez111 commentedComment #6
rj commentedIn D7, ckeditor (through wysiwyg module) was not displaying until fix from #2 was applied.
Comment #7
rv0 commentedcommitted the fix as suggested in #6 to 7.x-2.x-dev
Comment #9
ericras commentedThe change in #2 needs porting to 7.x-3.x-dev
Comment #10
rv0 commentedTo anyone reading this: don't bother writing a new patch for 7.x-3.x
The javascript has been completely rewritten and will be committed soon.
Comment #11
mpotter commentedI know you said not to submit a patch, but I need to anyway. I need a patch on drupal.org to run my project make file. So here it is for 7.x-3.x in case anybody else needs it while we are waiting for the new javascript.
Comment #12
rv0 commentedSince there's new code in dev which is entirely different, this doesn't seem to apply