Empty geocoding results do not respect the override checkbox state.

Created on 9 November 2020, about 4 years ago
Updated 17 July 2024, 5 months ago

Problem/Motivation

After #3002517: Geofield remains empty when I choose "Geocode from another field" β†’ the behaviour of geocoder_field_attach_presave() changed. Apart from the intended purpose of this issue, the geofield is now set to an empty value after (unsuccessful) geocoding, without taking the status of the override checkbox ($entity->geocoder_overridden) into account. This checkbox is only considered in the code path for successful geocoding.

Proposed resolution

In the current state (after #3002517: Geofield remains empty when I choose "Geocode from another field" β†’ ), different behaviour for if ($geocoded_value = geocoder_widget_get_field_value($entity_type, $instance, $entity)) makes no sense. Remove this if/else clause and always run the code on the if block.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Feuerwagen Bonn πŸ‡©πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024