-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New post location form: bug on the search-for-location #6915
Comments
thanks!!
…On Wed, Dec 4, 2019 at 2:49 PM Natalie St Jean ***@***.***> wrote:
I am unable to type anything in to the input "By place name" and search.
[image: FireShot Capture 093 - 🎈 Public Lab_ Post - localhost]
<https://user-images.githubusercontent.com/49460529/70174812-9d22b800-16a3-11ea-93cb-f26900ac05f2.png>
This value is being passed to panMapToGeocodedLocation in
leaflet-blurred-location... however the same input doesn't throw an error
in locations/_form.html.erb - it doesn't search properly, that will have
to be fixed as well, but it doesn't show "Oops, something went wrong!".
I will look into what is causing this!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6915?email_source=notifications&email_token=AAAF6J54XHUQJPE3BGJAYT3QXACSFA5CNFSM4JVNYZNKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H6DLOFA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J4GQDZRK62SMIJWT23QXACSFANCNFSM4JVNYZNA>
.
|
Can someone help me find the correct Javascript for this? In the |
So the error message appears to be from global maps and google's autocomplete API - probably failing on localhost because the site is not registered to their system. The error does not show up on the live site https://publiclab.org/post - this is what I get instead: Which is the exact same behavior that happens on the popup modal: I'm guessing that this bug is somewhere in leaflet-blurred-location, I'll have to set that repo up and get it working. |
But at the same time I still don't understand why I'm getting the error message on local on the post form, but not on the popup modal. |
Hmm, sometimes the API key is present in the google maps API javascript
include, and possibly we have set it up differently between those two
instances?
Hmm, maybe we should compare these two lines:
https://github.com/publiclab/plots2/blob/5c0d96274bd0be15feba69d8f30093082402ace5/app/assets/javascripts/locationForm.js#L152
https://github.com/publiclab/plots2/blob/268352c1ed382f2b9a18e70c7e6eaced9a950336/app/views/layouts/application.html.erb#L17
We may use this API for multiple purposes, though, but this could be a good
starting point!
…On Wed, Dec 4, 2019 at 3:59 PM Natalie St Jean ***@***.***> wrote:
But at the same time I still don't understand why I'm getting the error
message on local on the post form, but not on the popup modal.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6915?email_source=notifications&email_token=AAAF6J3YVYQU3DK7ZE5FNUDQXAKZHA5CNFSM4JVNYZNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF6PAPI#issuecomment-561836093>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6JZ65JSD2S5KTBZXZTLQXAKZHANCNFSM4JVNYZNA>
.
|
Ok I'll look at that code and try to figure out the difference! |
Hi @nstjean it sounds like you've found a couple possible overlapping bugs. If it's helpful to separate them into 2 issues that could help in the documentation! Thanks! |
Hi @sagarpreet-chadha this is something we'd like to have a system test for! |
Ok, I'll open an issue in LEL about the search getting stuck and not completing, and keep this one open for the "Oops something went wrong" issue with the form. |
Oops, I meant leaflet-blurred-location! |
Here we go, issue for the location search: publiclab/leaflet-blurred-location#214 |
I searched all over the code to try to figure out the difference between these two forms and why they are behaving differently. First I realized that the "Oops!" error statement is what should be showing, since there is an error with the google autocomplete. Finally I realized that it's the timing of the popup that is the issue. When I included I believe the reason it's not showing up on the pop-up modal is simply because it pops up later, and the error is already being triggered on the page on reload. Should I continue spending time figuring out how to get the timing corrected so the error shows up on the modal pop-up? Either way the issue will disappear when publiclab/leaflet-blurred-location#214 is solved. |
Hey @nstjean , |
I think that's a good idea. Thanks! |
I just wanted to say i went to https://publiclab.org/post and tried using the input, i was able to use
I think maybe we're parsing the response of the locations api incorrectly? This may be a 3rd bug that has to be broken out, but it seems to match one of your above observations (from the live site, not the |
Quite possible! |
OK! I've captured (lol) a sample response that I think we have to reconfigure around. I wonder when this changed and when it stopped working? https://gist.github.com/jywarren/eec9fcec10528caaf463df6068846b0e Can you try eliminating this variant of the bug by changing the parsing to match this? Then we can tackle Thanks, @nstjean ! |
Ah - let's move this most recent one -- the |
I am unable to type anything in to the input "By place name" and search.
This value is being passed to
panMapToGeocodedLocation
inleaflet-blurred-location
... however the same input doesn't throw an error inlocations/_form.html.erb
- it doesn't search properly, that will have to be fixed as well, but it doesn't show "Oops, something went wrong!".I will look into what is causing this!
The text was updated successfully, but these errors were encountered: