Geocoding a geofield on an external entity ... help

Created on 10 October 2022, over 1 year ago
Updated 27 June 2023, 12 months ago

I am having a problem using geofield/geocoder with External Entities.

The problem is that external entities are never created or saved, they already exist on some external system (a separate database in my case), so they're just loaded.

The External Entities module lets you assign fetched values to fields, which works fine for fields that don't need extra processing but is a problem here.

I have the latitude and longitude and I need to populate the external entity's geofield but just assigning to the lat/long fields doesn't invoke the geocoding process.

The only thing that's worked is:

  • Create a text field containing the address (even though I have the lat/long)
  • Set the geofield to geocode from this address field
  • Intercept the entity load and call geocoder_field_entity_presave() which is horrible

Any ideas would be appreciated?

💬 Support request
Status

Fixed

Version

3.31

Component

Code

Created by

🇬🇧United Kingdom adaddinsane

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.69.0 2024