ActionController::UrlGenerationError in Lists#subscriptions
This issue was reported by greg0r on GitHub. Closing it over there and opening it up here:
error description When I log into schleuder-web as a user I see the different mailinglists. If I click on a mailinglist where I am admin everything works as expected. If I click on a mailinglist where I am a simple subscriber, so no admin, I get the following error.
website ActionController::UrlGenerationError in Lists#subscriptions Showing /var/www/schleuder/app/views/application/_list_menu.html.haml where line #23 (closed) raised: No route matches {:action=>"show", :controller=>"subscriptions", :id=>nil} missing required keys: [:id]
Versions I am running the latest version of schleuder and schleuder-web and schleuder-cli
Logs development log
Started GET "/lists/13/subscriptions" for ::1 at 2018-01-07 12:48:33 +0100
Processing by ListsController#subscriptions as HTML
Parameters: {"id"=>"13"}
Account Load (0.1ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = ? LIMIT 1 [["id", 2]]
Ignoring check for hostname (verify_certificate_identity()).
Ignoring check for hostname (verify_certificate_identity()).
Ignoring check for hostname (verify_certificate_identity()).
Ignoring check for hostname (verify_certificate_identity()).
Ignoring check for hostname (verify_certificate_identity()).
Ignoring check for hostname (verify_certificate_identity()).
Ignoring check for hostname (verify_certificate_identity()).
Ignoring check for hostname (verify_certificate_identity()).
Ignoring check for hostname (verify_certificate_identity()).
Rendered errors/403.html.haml within layouts/application (0.2ms)
Rendered application/_navbar.html.haml (1.8ms)
Rendered application/_flashes.html.haml (0.2ms)
Ignoring check for hostname (verify_certificate_identity()).
Ignoring check for hostname (verify_certificate_identity()).
Rendered application/_list_menu.html.haml (275.0ms)
Rendered application/_page_header.html.haml (281.7ms)
Completed 500 Internal Server Error in 443ms (ActiveRecord: 0.1ms)
ActionView::Template::Error (No route matches {:action=>"show", :controller=>"subscriptions", :id=>nil} missing required keys: [:id]):
20: - else
21: %li
22: %span.glyphicon.glyphicon-th-list
23: = link_to_unless_current(t(".edit_subscription"), subscription_path(@subscription), accesskey: :s)
24: %li
25: = image_tag 'keyring.svg', width: '20px'
26: = link_to_unless_current(t(".keys"), list_keys_path(@list), accesskey: :k)
app/views/application/_list_menu.html.haml:23:in `_app_views_application__list_menu_html_haml__2780851482032896776_56576600'
app/views/application/_page_header.html.haml:4:in `_app_views_application__page_header_html_haml__3778167554438106556_59662820'
app/views/layouts/application.html.haml:22:in `_app_views_layouts_application_html_haml___4471767489713533406_19654580'
app/controllers/application_controller.rb:19:in `block in <class:ApplicationController>'
Rendered vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/templates/rescues/_source.erb (13.4ms)
Rendered vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (5.7ms)
Rendered vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.7ms)
Rendered vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb within rescues/layout (52.1ms)
``**`