Project

General

Profile

Accessing account/show/4 results in a 500 internal server error

Added by Simon Z almost 15 years ago

Hi,

Some day in april we downloaded and installed redmine-0.8.3.zip from rubyforge.
Upgraded a Redmine 0.8.2 database with no errors as far as I can recall.
We haven't noticed any problems except lately when trying to view user profiles.
Accessing http://hostnamehere/account/show/4 results in a 500 internal server error. (You may change 4 with any valid user profile id)

Even though I think the rake db:migrate worked it seems there are some database issue, maybe with a custom field.

So the question is how to fix this? I'm not much into Ruby or MySql or Redmine... yet.

Redmine runns on Mongrel fronted by Apache 2.2 and Mysql 5.0 as database in a windows 2003 environment.

Regards
Simon

---------------------
script/about
---------------------

About your application's environment
Ruby version 1.8.6 (i386-mswin32)
RubyGems version 0.9.4
Rails version 2.1.2
Active Record version 2.1.2
Action Pack version 2.1.2
Active Resource version 2.1.2
Action Mailer version 2.1.2
Active Support version 2.1.2
Application root E:/redmine
Environment development
Database adapter mysql

---------------------
production.log
---------------------

Processing AccountController#show (for 10.x.x.149 at 2009-05-09 15:50:42) [GET]
Session ID: 21c633028a090a2b84808017c2b8ac67
Parameters: {"action"=>"show", "id"=>"4", "controller"=>"account"}
Rendering template within layouts/base
Rendering account/show

ActionView::TemplateError (undefined method `empty?' for nil:NilClass) on line #13 of account/show.rhtml:
10: <li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') ></li>
11: <
end >
12: <
for custom_value in @custom_values >
13: <
if !custom_value.value.empty? >
14: <li><
= custom_value.custom_field.name%>: <%=h show_value(custom_value) ></li>
15: <
end >
16: <
end %>

app/views/account/show.rhtml:13:in `_run_erb_47app47views47account47show46rhtml'
vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:277:in `method_missing'
vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:171:in `method_missing'
vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:171:in `each'
vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:171:in `send'
vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:171:in `method_missing'
vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:277:in `method_missing'
app/views/account/show.rhtml:12:in `_run_erb_47app47views47account47show46rhtml'
vendor/rails/actionpack/lib/action_view/base.rb:342:in `send'
vendor/rails/actionpack/lib/action_view/base.rb:342:in `execute'
vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `send'
vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `render'
vendor/rails/actionpack/lib/action_view/template.rb:35:in `render'
vendor/rails/actionpack/lib/action_view/template.rb:22:in `render_template'
vendor/rails/actionpack/lib/action_view/base.rb:248:in `render_file'
vendor/rails/actionpack/lib/action_controller/base.rb:1112:in `render_for_file'
vendor/rails/actionpack/lib/action_controller/base.rb:845:in `render_with_no_layout'
vendor/rails/actionpack/lib/action_controller/layout.rb:251:in `render_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
vendor/rails/actionpack/lib/action_controller/base.rb:1161:in `default_render'
vendor/rails/actionpack/lib/action_controller/base.rb:1167:in `perform_action_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:579:in `call_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
vendor/rails/actionpack/lib/action_controller/rescue.rb:201:in `perform_action_without_caching'
vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
vendor/rails/actionpack/lib/action_controller/base.rb:529:in `send'
vendor/rails/actionpack/lib/action_controller/base.rb:529:in `process_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:568:in `process_without_session_management_support'
vendor/rails/actionpack/lib/action_controller/session_management.rb:130:in `process'
vendor/rails/actionpack/lib/action_controller/base.rb:389:in `process'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:149:in `handle_request'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `synchronize'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process_client'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process_client'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281
c:/ruby/bin/mongrel_rails:16:in `load'
c:/ruby/bin/mongrel_rails:16

Rendering E:/redmine/public/500.html (500 Internal Server Error)


Replies (3)

RE: Accessing account/show/4 results in a 500 internal server error - Added by Simon Z almost 15 years ago

Just found that we have one boolean custom field and it seems the user profile of users created after this field where added can be viewed. Seems like a bug to me.

Regards
Simon

Simon Z wrote:

...
Even though I think the rake db:migrate worked it seems there are some database issue, maybe with a custom field.
...

RE: Accessing account/show/4 results in a 500 internal server error - Added by Jakob Skjerning over 14 years ago

Simon, I recently ran into this same issue - or at least one with the same cause. I've posted details and a patch at #3705: http://www.redmine.org/issues/3705.

If you cannot wait for that to be applied, this workaround might work for you:

  1. Go to your Project administration area under Administration > Projects
  2. Visit each project that has the above issue.
  3. Click "Save".

This should fix the above issue - or rather, it did for me.

RE: Accessing account/show/4 results in a 500 internal server error - Added by Simon Z over 14 years ago

Thank you Jakob!
The "resaving" workaround works. But in the case of a user I have to change something on the user profile before saving.
I'll try you patch, don't want to view, change and save more than 100 users.

Regards
Simon

    (1-3/3)