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
jywarren opened this Issue Nov 28, 2016 · 16 comments

Comments

Projects
5 participants
@jywarren
Contributor

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 changed the title from Map page breaks with no `node.map.tms to Map page breaks with no @node.map.tms check Nov 28, 2016

@wvward

This comment has been minimized.

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

This comment has been minimized.

Contributor

jywarren commented Nov 28, 2016

@jywarren

This comment has been minimized.

Contributor

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

This comment has been minimized.

wvward commented Dec 8, 2016

@jywarren

This comment has been minimized.

Contributor

jywarren commented Dec 8, 2016

@Connerh92

This comment has been minimized.

Connerh92 commented Jan 31, 2017

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

This comment has been minimized.

Member

ananyo2012 commented Jan 31, 2017

@Connerh92 Sure you can take this up

@jywarren

This comment has been minimized.

Contributor

jywarren commented Jan 31, 2017

@VishalRocks

This comment has been minimized.

Contributor

VishalRocks commented Feb 4, 2017

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

@jywarren

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

jywarren commented Feb 15, 2017

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

@VishalRocks

This comment has been minimized.

Contributor

VishalRocks commented Feb 20, 2017

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

This comment has been minimized.

wvward commented Feb 20, 2017

@jywarren

This comment has been minimized.

Contributor

jywarren commented Feb 20, 2017

@VishalRocks

This comment has been minimized.

Contributor

VishalRocks commented Feb 22, 2017

Sure..this is the pull request #1285

@jywarren

This comment has been minimized.

Contributor

jywarren commented Feb 22, 2017

Great, solved over there!

@jywarren jywarren closed this Feb 22, 2017

@jywarren jywarren removed the in-progress label Feb 22, 2017

@jywarren jywarren moved this from in-progress to recently-completed in Outreach and coordination Feb 27, 2017

@jywarren jywarren removed this from First-timers only! in Welcome, new contributors! Feb 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment