I'm updating Profile2 entities that have Aaddressfield fields already with existing data, but a new Geocoder Geofield (with no data).

It appears that during the drush geocoder-backfill command, the geocoded data is not being saved because the original node's address is identical to the address as it's saved.

This patch checks to see if the original node had no geofield data, and only performs the comparison if the geofield is not empty. I believe that saving via the UI is different than using drush because of the way the addressfield's array is populated. It was identical using drush, but in the UI, all NULL values were given array keys and populated with `NULL` in the "$entity->original->myaddressfield array, but these keys and NULL values weren't part of the $entity->myaddressfield array.

Comments

jessehs’s picture

Status: Active » Needs review
StatusFileSize
new1.09 KB
rocket777’s picture

I have used this drush command as well, but entities that I have migrated that do not have the geocode data are not getting any values.
The drush command does not provide any message either success or failure, so don't know what's going on.

However, if I use the node/edit in the browser, the geocode data is saved from the address field that already has the data.

jessehs’s picture

Status: Needs review » Closed (duplicate)