Geocoding saves values that web UI doesn't accept
Overview
Geocoders can pass back a valid latitude/longitude that looks something like this: -12.456789012345
. That's 16 characters. However, CRM_Core_DAO::makeAttribute()
only allows saving float
values with a max of 14 characters. So attempting to edit an address with a long lat/lon results in a validation error.
Reproduction steps
- Manually enter into the database a
geo_code_1
value of-12.456789012345
on an address. - Attempt to edit the address.
Current behaviour
TIP: The best way to convey an error message is to copy it in here and use
three backtick ` symbols. You may edit the message to remove private
information (like passwords). The backticks will help to preserve any
special characters or spaces.
Expected behaviour
Geocode shouldn't trigger validation errors.