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.
Problem/Motivation
I am seeing a javascript error on the private-message/create page
TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at ce.fn.init.val (jquery.min.js?v=3.7.1:2:67761)
at HTMLInputElement.<anonymous> (private_message_members_widget.js?v=10.2.7:485:19)
at Function.each (jquery.min.js?v=3.7.1:2:3129)
at ce.fn.init.each (jquery.min.js?v=3.7.1:2:1594)
at removeMember (private_message_members_widget.js?v=10.2.7:484:45)
at private_message_members_widget.js?v=10.2.7:521:9
at dispatch (jquery.min.js?v=3.7.1:2:40035)
at v.handle (jquery.min.js?v=3.7.1:2:38006)
This is preventing the user from the autocomplete field from being added to the hidden form field and submitting the form results in the error message "You can not send a message to yourself only."
Issue fork private_message-3454771
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
loze CreditAttribution: loze commentedNot exactly sure why, but apparently inside the
.each()
functions$(this)
was undefined. so instead I changed it to use the element parameter in the each function. This MR seems to resolve the issue for me.Comment #4
loze CreditAttribution: loze commented