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

Validation errors not catching missing information on new map creation, showing errors #1517

Open
sentry-io bot opened this issue May 4, 2021 · 3 comments

Comments

@sentry-io
Copy link

sentry-io bot commented May 4, 2021

ActionView::Template::Error: No route matches {:action=>"index", :controller=>"warpables", :map_id=>nil}, missing required key...

Sentry Issue: MAPKNITTER-F

ActionController::UrlGenerationError: No route matches {:action=>"index", :controller=>"warpables", :map_id=>nil}, missing required keys: [:map_id]
  app/views/images/_new.html.erb:13:in `_app_views_images__new_html_erb__2696171409135089669_69868105663600'
    <%= form_for [@map, Warpable.new],  :html => { :multipart => true, :id => "fileupload" } do |f| %>
  app/views/layouts/knitter2.html.erb:186:in `_app_views_layouts_knitter__html_erb__2246446936845659260_69868103389560'
    <%= render :partial => "/images/new" unless params[:action] == 'new' %>
  app/controllers/maps_controller.rb:52:in `create'
    render 'new'
...
(148 additional frame(s) were not displayed)

ActionView::Template::Error: No route matches {:action=>"index", :controller=>"warpables", :map_id=>nil}, missing required keys: [:map_id]
@icarito
Copy link
Member

icarito commented May 4, 2021

Could this have something to do with our login issues at #1516? maybe if a user isn't properly logged in? how would we be losing the map_id during map editing?

@jywarren
Copy link
Member

jywarren commented May 4, 2021

I believe map_id is just the slug of the map, generated by concatenating the name of the map. I've asked Jeremiah in https://publiclab.org/questions/jerejack0507/05-04-2021/we-are-having-trouble-with-our-map-knitting to share what was submitted in the form, to try to clarify.

I made a new map earlier today so it's not affecting everyone.

Update: yes, i was able to reproduce this when trying to save a map with no name. I'll see if we can get validation errors to appear better too!

@jywarren
Copy link
Member

jywarren commented May 4, 2021

So to reproduce, create a map at https://mapknitter.org/maps/new but enter only a location (with latitude/longitude).

A related error is when you try to save with no location -- i.e. a completely blank form -- then you get this error: https://sentry.io/share/issue/b02e97eea11a42998c83bfa4de1e4e9a/

@jywarren jywarren changed the title Users are having trouble creating new maps (missing required key: map_id) Validation errors not catching missing information on new map creation, showing errors May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants