- 🇩🇪Germany christianadamski Berlin, Germany
Nobody else seems to experience this. Might be project specific. Closing.
After updating from 3.9 to 3.10 of this module, the proximity search doesn't work anymore. The problem seems to be situated in ProximityFilter. The code in acceptExposedInput() and query() has changed in this release and the problem is that in the form values in _center in 3.10 lat and lng are 0.
I think the code in
https://git.drupalcode.org/project/geolocation/-/blob/8.x-3.9/src/Plugin...
is missing in some way.
As a workaround I added the following form submit handler:
function my_project_form_views_exposed_form_alter(&$form, $form_state, $form_id) {
$form['#submit'] = [function($form, &$form_state) {
$form_state->setValue('geo_location_proximity_center', [
'coordinates' => [
'lat' => $form_state->getValue('lat'),
'lng' => $form_state->getValue('lng'),
]
]);
}, $form['#submit'][0]];
}
Now it works again, but this is simply a workaround.
Create a view with a proximity search filter and submit the form -> no filtering takes place.
I'm not deep enough in the module's code to say that, sorry.
Thanks in advance for a fix!
Bye Defcon0
Closed: outdated
3.10
Geolocation Field / Backend
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Nobody else seems to experience this. Might be project specific. Closing.