codeforcroatia / imamopravoznati

Provide a Freedom of Information request system for your jurisdiction
http://alaveteli.org
Other
3 stars 1 forks source link

[Pro] ERROR dashboard index (ActionView::Template::Error) "undefined method `url_title' #101

Open schlos opened 2 years ago

schlos commented 2 years ago

Tracked upstream: https://github.com/mysociety/alaveteli/issues/5271

Expected Behavior

Current Behavior

An ActionView::Template::Error occurred in dashboard#index:

  undefined method `url_title' for nil:NilClass
  app/models/alaveteli_pro/to_do_list/new_response.rb:25:in `url'

-------------------------------
Request:
-------------------------------

  * URL        : http://imamopravoznati.org/alaveteli_pro
  * HTTP Method: GET
  * IP address : REDACTED
  * Parameters : {"controller"=>"alaveteli_pro/dashboard", "action"=>"index"}
  * Timestamp  : 2021-09-19 17:44:40 +0200
  * Server : imamopravoznati.org
    * Rails root : /REDACTED/alaveteli
  * Process: 97814

-------------------------------
Session:
-------------------------------

  * session id: REDACTED
  * data: {"session_id"=>"REDACTED",
   "locale"=>"hr",
   "remember_me"=>false,
   "_csrf_token"=>"REDACTED",
   "user_id"=>7,
   "ttl"=>"2021-09-19T17:44:29.102+02:00",
   "post_redirect_token"=>"REDACTED"}

-------------------------------
Backtrace:
-------------------------------

  app/models/alaveteli_pro/to_do_list/new_response.rb:25:in `url'
  app/views/alaveteli_pro/dashboard/_to_do_item.html.erb:3:in `_app_views=
_alaveteli_pro_dashboard__to_do_item_html_erb__468434130264806470_4704217=
9588920'
  app/views/alaveteli_pro/dashboard/_to_do_list.html.erb:7:in `_app_views=
_alaveteli_pro_dashboard__to_do_list_html_erb___663713322460763305_470421=
79615080'
  app/views/alaveteli_pro/dashboard/index.html.erb:29:in `_app_views_alav=
eteli_pro_dashboard_index_html_erb___1382636302326718063_47042179897740'
  app/controllers/application_controller.rb:115:in `record_memory'
  lib/strip_empty_sessions.rb:14:in `call'

It happens when user tries to open Pro Dashboard (i.e. https://imamopravoznati.org/alaveteli_pro).

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

schlos commented 2 years ago

https://imamopravoznati.org/request/pregled_vlasnickih_udjela_u_trgo_23

An ActionView::Template::Error occurred in dashboard#index:

undefined method 'url_title' for nil:NilClass app/models/alaveteli_pro/to_do_list/new_response.rb:25:in 'url'

schlos commented 2 years ago

Related to https://github.com/mysociety/alaveteli/issues/5271