Here is my scenario:
I have an entity with a multivalue addressfield and a geofield that geocodes addresses from that field. Adding another address to an existing address field does not trigger a geocode on the field.
In geocoder_widget_get_field_value()
the call to geocoder_widget_array_recursive_diff()
seems to have the parameters in the wrong order:
if (!empty($field_original) && !empty($target_original)) {
$diff = geocoder_widget_array_recursive_diff($field_original, $source_field_values);
if (empty($diff)) {
return FALSE;
}
}
Since geocoder_widget_array_recursive_diff()
works like PHP's array_diff()
in that it returns the elements in array1 that are not in array2, it seems like this snippet will return FALSE
even if $source_field_values
(the new values) has a new item.
The attached patch reverses the parameters.
Comment | File | Size | Author |
---|---|---|---|
multivalue_field_additions.patch | 913 bytes | timhsieh | |
Comments
Comment #2
rudiedirkx CreditAttribution: rudiedirkx commentedActually they have to work both ways. You have to compare A with B, and B with A.
This will be fixed when #1515372: Caching Results is implemented.
Comment #3
Pol