mysociety / ipvtheme

The Alaveteli theme for Informace pro vsechny (Czech Republic)
http://infoprovsechny.cz
MIT License
3 stars 4 forks source link

[ERROR] admin_general#index (I18n::InvalidLocale) ":en is not a valid locale" #37

Closed lizconlan closed 6 years ago

lizconlan commented 7 years ago

This is the same error message we saw on the Belgium site. In that case it turned out to be a Rails 4.0 date handling bug https://github.com/mysociety/belgium-theme/issues/57 (it assumes English will always be available and raises an error when it isn't)

If this is what's happening here, hotfix/0.28.0.12 should fix it (current site version is 0.28.0.5)

An I18n::InvalidLocale occurred in admin_general#index:

  :en is not a valid locale
  app/views/admin_general/index.html.erb:203:in `_app_views_admin_general_index_html_erb__2795500028726217782_98382460'

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

  * URL        : http://www.infoprovsechny.cz/admin
  * HTTP Method: GET
  * IP address : FILTERED
  * Parameters : {"controller"=>"admin_general", "action"=>"index"}
  * Timestamp  : 2017-08-28 12:23:02 +0200
  * Process: 17400

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

  app/views/admin_general/index.html.erb:203:in `_app_views_admin_general_index_html_erb__2795500028726217782_98382460'
  app/controllers/application_controller.rb:113:in `record_memory'
  lib/strip_empty_sessions.rb:13:in `call'
lizconlan commented 7 years ago

Error on screen is

<a class="accordion-toggle" href="#unclassified" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@old_unclassified.size%></span><%= chevron_right %> Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response</a>

so it is the Rails 4.0 bug

(the error just now was me recreating it)

lizconlan commented 6 years ago

will be fixed by #38

garethrees commented 6 years ago

This page now loads, so closing this as fixed.