1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Radius search

Discussion in 'Professional Support' started by joit, May 21, 2015.

  1. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    I'm swamped atm, trying to find time to take a look.

    Sent from my HTC One using Tapatalk
     
  2. joit

    joit Active Member

    Level: Community
    Hi guys,

    any update on this one?
     
  3. joit

    joit Active Member

    Level: Community
    *friendly bump*
     
  4. rob

    rob Administrator Staff Member

    Level: Community
    Hi Hugh's travelling to the UK for his son's wedding, so won't be available for the next week or so.
    Would you mind summarising for me what the current outstanding issues are please?
    thanks
    Rob
     
  5. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    And unfortunately the wifi at the place we're staying is almost unusable, which irritates me as I stressed I needed good connectivity when I booked it, and they assured me it was solid.

    Sent from my HTC One using Tapatalk
     
  6. joit

    joit Active Member

    Level: Community
    No problem, here's the update. I started this post in may and cheesegrits already fixed some issues. There are just 2 remaining
    If there are 2 radius search plugins enabled, only the second works reliably (this uses to work in some 3.0.9 GitHub version).
    When Typing in the Geocode field, I often get the error "Geocode was not successful for the following reason: ZERO_RESULTS". Reason could be "Geocode as you type" but this error doesn't come up that often with the googlemap plugin. The message is very cryptical for the end user and isn't localized. What could be done about this? This has always been like this. You can use the city Geiselgasteig to reproduce. If you click the error message away you can continue typing.

    Thanks!
    Hannes
     
  7. rob

    rob Administrator Staff Member

    Level: Community
    Could you be more precise in which searches produce unexpected errors? I've tested with the latest github code and don't see anything obviously wrong with the second radius search. Note I might have fixed this last week when I copied over the rendering to JLayouts as I did spot a couple of things that looked wrong for multiple radius searches.

    For the geocode as you type have you filled in Fabrik's global config googlemaps account info? This will give you a lot more calls to the API
    I've also tweaked things to reduce the number of queries:

    1) For a given page load - search results are cached, so searching for 'a', then 'b', then 'a' will only perform 2 requests to the API, the third one being returned from the cached results.

    2) The geocode only triggers after 1 second of inactivity, so typing normally 'abc' should only run the API call once at the end of the typed sequence of characters. Pressing enter automatically starts the API call.
    I've also set the error message to be partially translated, with the constant PLG_LIST_RADIUS_SEARCH_GEOCODE_ERROR, the '%s' is replaced with the actual message that google returns "ZERO_RESULTS" in your example. I guess if you don't want to show that then you can create a language override and remove the %s from the constant

    Those change have been committed to github
     
  8. joit

    joit Active Member

    Level: Community
    I tested and unfortunately multiple radius search plugins still don't work. Clear filters is also brokje again and the cancel button in the popup doesn't close the popup.
    I entered the api key and it fixed some issues but not the geocode as you type. Did you test with Geisegasteig? When I type it, I can type until Geiselgas. Then comes the error message. If I close it, I can type further. Please note that there doesn't pop up an error message if i type Geiselgasteig into the GoogleMap plugin.
     
  9. troester

    troester Well-Known Member Staff Member

    Level: Community
    Multiple radius search plugins:
    I assume Fabrik was not designed to have multiple googlemap elements in one list. At least in the googlemap viz you can't define a map element - the list must contain exactly one...
    Which browser? On my site the cancel button (or closing x) are closing the popup but then it's always showing an alert "do you want to clear radius search?" (but it doesn't clear even if OK is clicked).

    "Geiselgasteig":
    It's found (in Germany) in the googlemap element and in the radius search on my site.
    But I'm pretty sure the 10 minutes ago the radius search did find it: it was located somewhere in USA? and with
    "geiselgasteig, deutschland" it was showing zero_results (maybe Google is learning; try to clear Joomla and browser cache)
    but I have no problem to type it
    Maybe also browser related.

    "Clear filter":
    is showing all list data
    is resetting the user location (browser is asking again)
    but the last geocoding is still showing in the radiussearch popup (though not used for filtering)
     
    Last edited: Sep 17, 2015
  10. joit

    joit Active Member

    Level: Community
    But it used to work great in 3.0.9...

    Chrome. The "X" in the upper right of the corner works but klicking "cancel" doesn't work in my case.

    What I don't understand that it works great in the googlemap element plugin but not in the radius search plugin.

    Thanks again for your help!!!
     
  11. troester

    troester Well-Known Member Staff Member

    Level: Community
    Ok, I can replicate your issue if setting "geocode as you type" =yes in the radius search plugin options.
    But it's ok with "no".

    BTW:
    I can't see any sense in geocoding with every single character, with and without relay or caching (nor in radius search nor in the form). One character and the marker is skipping around the world...
    If you don't want a button it should be on Enter, Tab, leaving element focus
     
  12. rob

    rob Administrator Staff Member

    Level: Community
    This is simply because Google cant find anything related to the word 'Geiselgas'. Its nothing to do with our code - you can confirm that by going to http://googlemaps.github.io/js-v2-samples/geocoder/singlegeocode.html and searching for Geiselgas.

    Apart from that I can geocode fine in the two pop ups in your tours page.
    Closebutton - should be fixed

    Could you desribe what you are doing and what you are seeing and what you expect to see? I've seen that there was some additional code in the old 2.5 branch related to clear filters that I have added in, but I'm not sure if this affects the issue you are having.
     
  13. joit

    joit Active Member

    Level: Community
    Thanks for the update. I'm on a business trip until thursday and I'll try as soon as I get back!

    About clear filters: it's as Troester described, it doesn't clear the values entered in the popup
     
  14. joit

    joit Active Member

    Level: Community
    Hitting clear filters now resets the filtering but the elements the user changed are not resetted to default (same is for the close button in the popup). Is this the way it is supposed to be?
    Now if there are 2 radius search plugins in the form, the second one doesn't open the popup but the first one works.
     
  15. rob

    rob Administrator Staff Member

    Level: Community
    I don't have an issue with the 2nd radius search. Your test site is off line now so I can't check what you are seeing. Is there a way you can re-enable it?
     
  16. joit

    joit Active Member

    Level: Community
    you fixed it!!!!
    I almost lost hope but now it works like a a charm!!!
    thanks a 1000 tons!!!
    still playing around and loving it!!!
     
    Last edited: Sep 25, 2015
  17. rob

    rob Administrator Staff Member

    Level: Community
    cool. I hadn't touched anything since my last post. but glad that its working
     

Share This Page