Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
function taxonomy_autocomplete($field_name, $bundle, $tags_typed = '') {
$instance = field_info_instance($field_name, $bundle);
As of #470242: Namespacing for bundle names, field_info_instance() takes $obj_type as its first argument, so the page callback needs to receive that info as well.
Also changed the widget code to actually make use of the 'autocomplete_path' widget setting instead of hardcoding 'taxonomy/autocomplete/...'.
Which brings: #631058: Expose taxonomy autocomplete 'size' variable to the UI
Comment | File | Size | Author |
---|---|---|---|
#5 | taxonomy_autocomplete.patch | 1.76 KB | yched |
#3 | taxonomy_autocomplete.patch | 1.72 KB | yched |
taxonomy_autocomplete.patch | 1.9 KB | yched | |
Comments
Comment #1
sunWrong string concatenation here (there should be a space on both sides of the period)
Looking at the real function signature of field_info_isntance(), I somehow wonder how the code was able to work before... is $instance used at all in this function?
I'm on crack. Are you, too?
Comment #2
Dries CreditAttribution: Dries commentedThis smells like we need more/better tests. ;-)
Comment #3
yched CreditAttribution: yched commentedDoh, taxonomy_autocomplete() in fact doesn't use the $instance - rightly so, AFAICT there's no instance-level stuff that would affect its behavior.
Well, that's different, then - it doesn't need the $bundle param either.
Comment #4
sunBut what happened to this nicety now?
This review is powered by Dreditor.
Comment #5
yched CreditAttribution: yched commentedAh, right, I rolled a new patch from scratch but forgot the
$instance['widget']['settings']['autocomplete_path']
bit.Comment #6
sunGreat! :)
Comment #7
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks yched.