Test case: I created a content type with one text field, and one checkbox. Made the checkbox a "radio buttons / checkboxes" type, with more than one allowed value. Made text field dependent on checkbox. Now, when editing a node of that content type, IE6 gives the following error:
Line: 39
Character: 25
Code: 0
Error Message: 'parent_forms[...].children_arr' is null or not an objectWhich specifies this line in dependent.js:
parent_forms[parent_id]["parents_arr"].push($(_button));
It doesn't matter whether the parent field is radio buttons (single value) or checkboxes (multi value). Note that this works fine in Firefox. I haven't tested in IE7 or Safari. I'd like to ignore it, but with IE6 still such a large percentage of the market, I really can't.
This doesn't appear to be a module conflict or anything. If you'd like to see a (relatively) clean example of the issue, go to asinineproductions.com. The "dependentTest" content type and "dtest2" node (editable without logging in will demonstrate the problem. Just edit the node.
Comments
Comment #1
Tamar Badichi-Levy commentedThank you. I have fixed the issue with IE6. I have uploaded the new release.
Comment #2
meeotch commentedThanks for the fix. Preliminary testing indicates that it does seem to work in IE6 now. However, I'm now getting an error in the "Manage Fields" admin page for content types that have fields with Dependency turned on:
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/doctoris/public_html/asinineproductions/sites/all/modules/dependent/dependent.module on line 29.Again, it's not in the "configure" screen for the individual fields (where the Dependent options are located), it's in the "Manage Fields" list for the content type - and only when one or more fields has Dependency turned on. Pretty weird. I've tried running update.php, but that didn't seem to have any effect. Let me know if you can't reproduce it. (It shows up on my minimal test installation referenced above, as well.)
There also seems to be an issue with dependent fields not showing up in a Panel that's using a "CCK Group" content chunk. (The non-dependent fields show up, but the dependent ones don't.) I'll submit this as a separate issue, though - it may take a while to narrow down the test case.
Oh - and thanks again for the quick fixes. It's nice to be using a module that's actively maintained!
Comment #3
Tamar Badichi-Levy commentedThank you too.
I'm using the module very extensively in my projects because I believe it makes the user experience much more easier and fun.
I have uploaded a new release that fixes the warning.
Comment #4
meeotch commentedConfirming that the fix seems to eliminate the warning message. Thanks again!
I'll post about the Panels issue when I get a chance to reproduce it in a minimal setup. Panels is turning out to be pretty complex to figure out. (Long story short: the dependent fields don't seem to show up, even if their parent is "on".)
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.