Bug #10947
closedundefined local variable or method `timezone'
Description
Get following error when logging into Foreman GUI:
undefined local variable or method `timezone' for #<User:0x007ffe508a55b0>
Corresponding trace:
NameError
undefined local variable or method `timezone' for #<User:0x007ffe508a55b0>
app/models/user.rb:535:in `validate_timezone'
app/models/user.rb:192:in `block in try_to_login'
app/models/concerns/foreman/thread_session.rb:72:in `as'
app/models/concerns/foreman/thread_session.rb:78:in `as_anonymous_admin'
app/models/user.rb:191:in `try_to_login'
app/controllers/users_controller.rb:71:in `login'
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
CentOS release 6.6 (Final)
2.6.32-504.8.1.el6.x86_64
foreman 1.8.2
puppetlabs-release-6-11
puppet-server-3.8.1-1
Updated by Dominic Cleal almost 10 years ago
This sounds like an upgrade issue, did you update from 1.7 to 1.8? Try running "foreman-rake db:migrate" to check the database was migrated.
Updated by Dominic Cleal almost 10 years ago
- Status changed from New to Need more information
Updated by Brian Hardy almost 10 years ago
This was due to an upgrade from 1.7 to 1.8. We ran "foreman-rake db:migrate" followed by "foreman-installer" and the issue went away.
Updated by Dominic Cleal almost 10 years ago
- Status changed from Need more information to Resolved
Thanks for confirming!