Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi
when using a contextual filter which is pulled from a relationship (the coordinates are fields of vocabulary, the view lists nodes which are tagged with that vocabulary)
if I add a _lat contextual filter the sql query looks like
WHERE (( (taxonomy_term_data_field_data_taxonomy_vocabulary_6__field_data_field_map.field_map_lat = '28.487474441528' ) )
if I add a proximity filter the sql looks like
WHERE (( (( 6371000 * ACOS( COS( RADIANS(28.487474441528) ) * COS( RADIANS(field_data_field_map.field_map_lat) ) * COS( RADIANS(field_data_field_map.field_map_lon) - RADIANS(-16.316955566406) ) + SIN( RADIANS(28.487474441528) ) * SIN( RADIANS(field_data_field_map.field_map_lat) ) ) )<100) )
So, when using proximity, the relationship doen t seem to be taken into account.
Simone
Comment | File | Size | Author |
---|---|---|---|
#3 | geofield-2052309-3-Fixed-Proximity-views-argume.patch | 1.99 KB | geek-merlin |
Comments
Comment #1
geek-merlinI can confirm this. Major PITA.
Comment #2
geek-merlinI could workaround this by reversing the direction:
* Proximity filter from base table to relationship does NOT work
* Proximity filter from relationship to base table DOES work
Of course this does not work if you need proximity from relationship to relationship...
Comment #3
geek-merlinOK now i needed this.
Patch flying in that fixes this nasty bug for me.
Comment #4
geek-merlin