Skip to content
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

/inline-maps page showing some errors #5678

Closed
jywarren opened this issue May 7, 2019 · 16 comments · Fixed by #6802
Closed

/inline-maps page showing some errors #5678

jywarren opened this issue May 7, 2019 · 16 comments · Fixed by #6802
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript

Comments

@jywarren
Copy link
Member

jywarren commented May 7, 2019

https://publiclab.org/wiki/inline-maps seems to be stalling and erroring a bit, and I know @sagarpreet-chadha has worked on this before, so I feel bad bringing it up again, but there are some

I see a few things going on which I think is what makes this so complicated.

  1. This is inconsistent, but I'm seeing a lot of the maps on that page greyed out, as if they're stalling while loading
  2. Oddly, when I changed the width of the page, some more markers showed up
  3. The ones further down are really stuck (see screenshots below)

Also, this error is shown on the page:

Uncaught TypeError: Cannot read property 'featureLayer' of undefined
    at wisconsinLayer (eval at <anonymous> (application-98ba6c8dece3e3db273f0b0692b8692bfdaa79300cf55d6636e3ed1f2f5aa3b1.js:350), 

I think this really may be multiple overlapping issues here! Maybe once we get it totally working, we should write a system test to protect this, since there's so much JS/Ruby integration going on here: #5316

image

image

@jywarren jywarren added bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript labels May 7, 2019
@jywarren jywarren added this to the Geographic features milestone May 7, 2019
@sagarpreet-chadha
Copy link
Contributor

More details here : #4722

I made a copy of this page as a note of the main wiki page here : https://publiclab.org/notes/sagarpreet/01-30-2019/inline-map-testing and this note is working fine .

I am investigating on why the same content is not working on the wiki page : https://publiclab.org/wiki/inline-maps . Most probably it is due to external JS code exclusively coded in /wiki . Thanks :)

@jywarren
Copy link
Member Author

jywarren commented May 8, 2019 via email

@sagarpreet-chadha
Copy link
Contributor

@jywarren ...i think i found the solution to this.
Do look at the PR #6699 . It is because of some function in short-code-forms lib.

@jywarren
Copy link
Member Author

Let's double check in production once this publishes!

@sagarpreet-chadha
Copy link
Contributor

Yes, you are depolying now?

@jywarren
Copy link
Member Author

jywarren commented Nov 14, 2019 via email

@jywarren
Copy link
Member Author

OK, so the maps on this page all now load properly! https://publiclab.org/wiki/inline-maps

But, the markers for each type do not. Looks like a nested bug maybe... @sagarpreet-chadha are you able to take a look at why?

@jywarren
Copy link
Member Author

Aha! I'm seeing that maybe there is an initial event trigger that needs to be set up, and that possibly this only fetches markers upon interacting with the map? Not 100% sure, but that seems to work here:

https://publiclab.org/wiki/sandbox-3

when you pan or zoom it loads markers!

@jywarren
Copy link
Member Author

image

@sagarpreet-chadha
Copy link
Contributor

Hey @jywarren ,

In all the API calls,

tag | question:infragram is getting added in request URL. Sending a patch for this now.

@jywarren
Copy link
Member Author

jywarren commented Nov 18, 2019 via email

@sagarpreet-chadha
Copy link
Contributor

Solved in this PR: #6802 . The trick is to use unique variable names everywhere, i will remember this 😄 !!! Otherwise hard to find this bug if one has no context!

@jywarren
Copy link
Member Author

jywarren commented Nov 18, 2019 via email

@jywarren
Copy link
Member Author

Nice - fixed and live! https://publiclab.org/wiki/inline-maps

@sagarpreet-chadha
Copy link
Contributor

sagarpreet-chadha commented Nov 21, 2019 via email

@jywarren
Copy link
Member Author

jywarren commented Nov 21, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed help wanted requires help by anyone willing to contribute JavaScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants