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

Map page breaks with no @node.map.tms check #1026

Closed
1 of 5 tasks
jywarren opened this issue Nov 28, 2016 · 16 comments
Closed
1 of 5 tasks

Map page breaks with no @node.map.tms check #1026

jywarren opened this issue Nov 28, 2016 · 16 comments
Labels
first-timers-only They need to be well-formatted using the First-timers_Issue_Template. help wanted requires help by anyone willing to contribute Ruby

Comments

@jywarren
Copy link
Member

jywarren commented Nov 28, 2016

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

The problem

The map page at http://publiclab.org/map/northern-virginia-community-college-sterling-virginia/03-07-2014 shows an error, with a server log output of the following:

Completed 500 Internal Server Error in 258ms

ActionView::Template::Error (undefined method `tms' for nil:NilClass):
2: <iframe style="width:100%;border:none;background:#ddd;margin-bottom:8px;" height="375" src="http://archive.publiclaboratory.org/leaflet/?tms=<%= @node.map.tms %>&lon=<%= @node.lon %>&lat=<%= @node.lat %>&zoom=<%= @node.map.min_zoom+1 %>"></iframe>
app/views/map/show.html.erb:2:in `_app_views_map_show_html_erb___64319787606996866_46932220'

It's supposed to show a map similar to this page: https://publiclab.org/map/barataria-site-abh1-barataria-bay-louisiana/07-25-2014

This issue reformats and replaces #131.

Solution

The error is on line 2 of:

https://github.com/publiclab/plots2/tree/master/app/views/map/show.html.erb:L2

The error could be solved by adding a if @node.map conditional around the line that uses @node.map.tms:

<% if @node.map %>
  <iframe style="width:100%;border:none;background:#ddd;margin-bottom:8px;" height="375" src="//archive.publiclab.org/leaflet/?tms=<%= @node.map.tms %>&lon=<%= @node.lon %>&lat=<%= @node.lat %>&zoom=<%= @node.map.min_zoom+1 %>"></iframe>
<% end %>

Steps to Fix

  • claim this issue with a comment here, below, and ask any clarifying questions you need
  • set up a repository locally following the README instructions, and make sure that all tests pass
  • try to fix the issue following the steps above, but even before you're done, you can:
  • commit your changes and start a pull request (see contributing to Public Lab software) but mark it as "in progress" if you have questions or if you haven't finished
  • alert someone via the developers list (see below) to have your pull request merged. This may take a few extra steps depending on when you do it, but we'll help you out!

Please email the developers list (see https://publiclab.org/developers) if you have questions!

@jywarren jywarren added first-timers-only They need to be well-formatted using the First-timers_Issue_Template. help wanted requires help by anyone willing to contribute Ruby labels Nov 28, 2016
@jywarren jywarren changed the title Map page breaks with no `node.map.tms Map page breaks with no @node.map.tms check Nov 28, 2016
@wvward
Copy link

wvward commented Nov 28, 2016

I'd like to contribute to this issue. I've read through the README & requested an invite to C9.io.

@jywarren
Copy link
Member Author

jywarren commented Nov 28, 2016 via email

@jywarren
Copy link
Member Author

jywarren commented Dec 7, 2016

Hi, just checking if you've gotten stuck on this at all, or if I could help in any way? Thanks!

@wvward
Copy link

wvward commented Dec 8, 2016 via email

@jywarren
Copy link
Member Author

jywarren commented Dec 8, 2016 via email

@Connerh92
Copy link

Hello, I noticed this was still open and it has been over a month since the last person had messaged, so I was wondering if I could have a go at this issue and fix it. Thanks!

@ananyo2012
Copy link
Member

@Connerh92 Sure you can take this up

@jywarren
Copy link
Member Author

jywarren commented Jan 31, 2017 via email

@VishalRocks
Copy link
Contributor

Hi I saw this issue open, can I solve this?

@jywarren
Copy link
Member Author

jywarren commented Feb 6, 2017

Perhaps @Connerh92 is still working on it? If not, you can find more problems to solve here:

https://github.com/publiclab/plots2/projects/2?fullscreen=true

thank you!!!

@jywarren
Copy link
Member Author

@Connerh92, are you still working on this? If not, @VishalRocks, you can probably give it a try!

@VishalRocks
Copy link
Contributor

I have done it..but how to test it in local? I tried url localhost:3000/map/northern-virginia-community-college-sterling-virginia/03-07-2014

@wvward
Copy link

wvward commented Feb 20, 2017 via email

@jywarren
Copy link
Member Author

jywarren commented Feb 20, 2017 via email

@VishalRocks
Copy link
Contributor

Sure..this is the pull request #1285

@jywarren
Copy link
Member Author

Great, solved over there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first-timers-only They need to be well-formatted using the First-timers_Issue_Template. help wanted requires help by anyone willing to contribute Ruby
Projects
None yet
Development

No branches or pull requests

5 participants