I'm seeing this error show up in my logs for a view even though the view is indeed outputting the results okay. Any idea why this could be occurring?

I tracked down the logic that is throwing the error:

if (!is_numeric($proximity) || !abs($proximity) > 0) {
throw new ProximityUnavailableException($this->t('@proximity_handler not able to calculate valid Proximity value', [
'@proximity_handler' => get_class($this),
]));
}

I know the values are numerics to That part !abs($proximity) > 0.... Does that suggest throw the error if proximity could return 0? Wouldn't that indicate an exact match to coordinates?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

apmsooner created an issue. See original summary.

  • itamair committed 64a5880 on 8.x-1.x
    Issue #3091862: ERROR: Drupal\geofield\Plugin\GeofieldProximitySource\...
itamair’s picture

Status: Active » Fixed
FileSize
1.12 KB

Nice catch @apmsooner ... that check seem not to be useful, in any case (correct me if I am wrong).
I got rid of it with the attached patch and committed it into dev. Will be part pf the next release ...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.