I created a Leaflet view and added an exposed proximity filter.

1) When I enter an address, a distance and I apply the filters, all the results remain displayed.

delete

2) When the filter is exposed in a block, the distance is displayed but not the address.

delete

(in the right menu filter logo)

Comments

zenimagine created an issue. See original summary.

zenimagine’s picture

Same problem on simplytest.me

InvalidArgumentException: The configuration property display.default.display_options.filters.field_geolocation_demo_single_proximity.value.center.geocoder doesn't exist. in Drupal\Core\Config\Schema\ArrayElement->get() (line 76 of /home/df97x/www/core/lib/Drupal/Core/Config/Schema/ArrayElement.php).

christianadamski’s picture

Status: Active » Needs review
StatusFileSize
new42.13 KB
christianadamski’s picture

With the recent changes, I could simplify a lot of the geocoding code.

zenimagine’s picture

Now it works, but there are still some problems.

I have warnings in the drupal logs.

When the proximity filter is grouped, the address field does not appear.

Warning: trim() expects parameter 1 to be string, array given in Drupal\views\Plugin\views\filter\FilterPluginBase::arrayFilterZero() (line 1559 of /var/www/www-domaine-com/web/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php)

  • ChristianAdamski authored 415c9d2 on 8.x-2.x
    Issue #2995037 by ChristianAdamski, zenimagine: Proximity search exposed...
christianadamski’s picture

Status: Needs review » Fixed

@zenimagine - please open a new issue for the grouped thing. Does the trim() error happen in that context, or also without grouped filters?

christianadamski’s picture

And by the way: I'll be in Paris the rest of the weak, for the first time :)

zenimagine’s picture

@ChristianAdamski

OK, have a nice trip. I opened a new problem for grouped filters :

https://www.drupal.org/project/geolocation/issues/2995688

Status: Fixed » Closed (fixed)

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

zenimagine’s picture

Issue summary: View changes
neelaj82’s picture

Hi zenimagine

I stumbled upon this post many times while I was debugging the proximity exposed form filter issues. I had the same issues that you were having and even though the proximity filter was working for some nodes it wan't 100% functioning. Are you using `geolocation_address_link` module to convert your address into its gecoded values? If yes the problem lies there. The lat/lng values are updated however the cos/sin/rad values are not when you created you node. Check this https://www.drupal.org/project/geolocation_address_link/issues/2952628. You might want to patch this first . Also attached is the screenshot of my table where the fields are empty hence your proximity filter will never work if you have something like this.

I have also attached the views screenshot if you want to check the settings. Happy to help if you have more questions

zenimagine’s picture

@neelaj82 Hi, I have no problem since the last update. Now there is this bug to correct https://www.drupal.org/project/geolocation/issues/2995688