Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Wondering if anybody else has seen this since 7.16 went live:
TypeError: 'undefined' is not a function (evaluating 'this.name.charAt(0)')
states.js: 294
Error occurs if I have Conditional Fields active and add/edit a node, resulting in most of the javascript on the page failing. Disabling the module makes the error go away and everything else then works as expected.
Comments
Comment #1
wrd CreditAttribution: wrd commentedAppears that this is actually an issue with jQuery Update:
http://drupal.org/node/1815896
Comment #2
osopolar#1815896: jQuery 1.7 and 1.8 breaks conditional #states forms
[Edit] I just realized the link in above comment.
Comment #3
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedwhen you use the and, or, xor functionality you will get this error.
one dependent and one dependee seems to work fine with jquery 1.7
I had to delete all my conditional fields (removing the second value for the dependee and clearing cache didn't work. please report back if it works for you)
remove the above function
and then re-add them again
seems to work fine
Comment #4
deanflory CreditAttribution: deanflory commentedI'm using the base jQuery 1.4.4 with jquery_update and jqmulti disabled and I was finding my javascript on my /admin/people/create form was messed-up. It's taken me quite a while to track down what's been giving my site problems and this is probably it. I set this up so long ago I can't remember exactly but only having one dependent and one dependee is extremely restrictive, making the module useless in most cases for me. *sigh*
I don't believe I was using the and, or, xor functionality, can't remember.
Clearly this module isn't getting enough love so I'm disabling it with the expectation that it won't get fixed anytime soon, sadly.
I'm putting in a few keywords here to help people find this when searching to reduce their time debugging:
Javascript not working
Js not working
JS broken
Javascript broken
jQuery not working
jQuery broken
Collapsible fieldset not working
Collapsible fieldsets not working
toggle-downs not working
toggle-down not working
collapsible fieldset won't open
Comment #5
VVS CreditAttribution: VVS commentedSee https://drupal.org/node/1815896#comment-7567767
Comment #6
hefox CreditAttribution: hefox commentedThis isn't really conditional fields fault, so marking it postponed to indicate it's postponed on jquery update being fixed.
Comment #7
dqd#6: exactly. Thanks! Also #1,#2,#3 indicate that this is not an issue (bug) to keep further open. Apart from that:
Thanks for the report and all the efforts in here. But due to inactivity in this issue for some years and because of the upcoming EOL of Drupal 7, I will close this issue on the way by cleaning up the issue queue.
Feel free to re-open as "Needs review" if you found a solution or have a patch to be reported to help others on this outdated version.
If you think this issue or missing feature should be addressed in a newer Drupal core 8 and above compatible version of this project, then please file a new issue to the latest dev.