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.
Relatedlinks modul overrides Drupal.jsAC.prototype.hidePopup function from misc/autocomplete.js.
Overriden function sets input fields value to this.selected.autocompleteValue (line 227), but
this variable is defined only for relatedlinks input fields, so other autocomplate input
fields are filled with value "undefined".
Possible fix:
sites/all/modules/relatedlinks/relatedlinks.js ( replace line 227 with: )
if(this.selected.autocompleteValue){ // value for relatedlinks input fields
this.input.value = this.selected.autocompleteValue;
}
else{ // standard value from autocomplate.js for other autocomplete input fields
this.input.value = $(this.selected).data('autocompleteValue');
}
Comments
Comment #1
aendra CreditAttribution: aendra commentedConfirming that the possible fix suggested above works to resolve the issue. Patch attached using above code.
Comment #2
aendra CreditAttribution: aendra commentedErp, forgot to set status -- apologies, I haven't really submitted patches before.
Comment #3
aendra CreditAttribution: aendra commentedEdit -- gah, sorry, submitted twice. Is it possible to remove issue comments?
Comment #4
furamag CreditAttribution: furamag commentedI just tested patch from #3 on Drupal 7.16. It works fine for me.
Comment #5
berenddeboer CreditAttribution: berenddeboer commentedWorks.