Project

General

Profile

Upgrade from v0.6.1 to v0.7.0 RC1 - 500 Error

Added by Ian Tyndall over 16 years ago

After a recent upgrade, we have one issue that results in a 500 error upon selecting it.
So far, this appears to happen just for this one.

Processing IssuesController#show (for 192.168.2.110 at 2008-04-23 10:40:08) [GET]
Session ID: fed3f44e33063e7cdebf67b60bed2cbc
Parameters: {"action"=>"show", "id"=>"24", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml

ActionView::TemplateError ("issue" is not a valid constant name!) on line #11 of issues/_history.rhtml:
8: <li><%= show_detail(detail) ></li>
9: <
end >
10: </ul>
11: <
= render_notes(journal) unless journal.notes.blank? >
12: </div>
13: <
end %>

vendor/rails/activesupport/lib/active_support/inflector.rb:254:in `constantize'
vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:148:in `constantize'
vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb:46:in `association_class'
vendor/rails/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb:28:in `find_target'
vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:133:in `load_target'
vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:55:in `reload'
vendor/rails/activerecord/lib/active_record/associations.rb:992:in `journalized'
app/models/journal.rb:59:in `project'
app/models/journal.rb:55:in `editable_by?'
app/helpers/journals_helper.rb:21:in `render_notes'
app/views/issues/_history.rhtml:11:in `_run_erb_47app47views47issues47_history46rhtml'
app/views/issues/_history.rhtml:1:in `each'
app/views/issues/_history.rhtml:1:in `_run_erb_47app47views47issues47_history46rhtml'
vendor/rails/actionpack/lib/action_view/base.rb:637:in `send'
vendor/rails/actionpack/lib/action_view/base.rb:637:in `compile_and_render_template'
vendor/rails/actionpack/lib/action_view/base.rb:365:in `render_template'
vendor/rails/actionpack/lib/action_view/base.rb:316:in `render_file'
vendor/rails/actionpack/lib/action_view/base.rb:331:in `render'
vendor/rails/actionpack/lib/action_view/partials.rb:120:in `render_partial'
vendor/rails/actionpack/lib/action_view/base.rb:352:in `render'
app/views/issues/show.rhtml:87:in `_run_erb_47app47views47issues47show46rhtml'
vendor/rails/actionpack/lib/action_view/base.rb:637:in `send'
vendor/rails/actionpack/lib/action_view/base.rb:637:in `compile_and_render_template'
vendor/rails/actionpack/lib/action_view/base.rb:365:in `render_template'
vendor/rails/actionpack/lib/action_view/base.rb:316:in `render_file'
vendor/rails/actionpack/lib/action_controller/base.rb:1100:in `render_for_file'
vendor/rails/actionpack/lib/action_controller/base.rb:861:in `render_with_no_layout'
vendor/rails/actionpack/lib/action_controller/layout.rb:262:in `render_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
x:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
app/controllers/issues_controller.rb:102:in `show'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:131:in `call'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:131:in `custom'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:156:in `call'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:156:in `respond'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:150:in `each'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:150:in `respond'
vendor/rails/actionpack/lib/action_controller/mime_responds.rb:107:in `respond_to'
app/controllers/issues_controller.rb:101:in `show'
vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `send'
vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `perform_action_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:697:in `call_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
x:/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:199:in `perform_action_without_caching'
vendor/rails/actionpack/lib/action_controller/caching.rb:678: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.rb:677:in `perform_action'
vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
vendor/rails/actionpack/lib/action_controller/base.rb:388:in `process'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in `handle_request'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
vendor/rails/railties/lib/webrick_server.rb:112:in `handle_dispatch'
vendor/rails/railties/lib/webrick_server.rb:78:in `service'
x:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
x:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
x:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
x:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
x:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
x:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
x:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
x:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
x:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
x:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
vendor/rails/railties/lib/webrick_server.rb:62:in `dispatch'
vendor/rails/railties/lib/commands/servers/webrick.rb:66
x:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
x:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
vendor/rails/railties/lib/commands/server.rb:39
x:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
x:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
script/server:3

Rendering X:/htdocs/redmine-0.7.0_RC1/public/500.html (500 Internal Server Error)


Replies (7)

RE: Upgrade from v0.6.1 to v0.7.0 RC1 - 500 Error - Added by Ian Tyndall over 16 years ago

I get the same error from the latest in SVN:

NameError in Issues#show

Showing issues/_history.rhtml where line #11 raised:

"issue" is not a valid constant name!

Extracted source (around line #11):

8:        <li><%= show_detail(detail) %></li>
9:     <% end %>
10:     </ul>
11:     <%= render_notes(journal) unless journal.notes.blank? %>
12:     </div>
13: <% end %>

Full Trace:

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/inflector.rb:254:in `constantize'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/core_ext/string/inflections.rb:148:in `constantize'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/associations/belongs_to_polymorphic_association.rb:46:in `association_class'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/associations/belongs_to_polymorphic_association.rb:28:in `find_target'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/associations/association_proxy.rb:132:in `load_target'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/associations/association_proxy.rb:55:in `reload'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/associations.rb:992:in `journalized'
app/models/journal.rb:60:in `project'
app/models/journal.rb:56:in `editable_by?'
app/helpers/journals_helper.rb:21:in `render_notes'
app/views/issues/_history.rhtml:11:in `_run_rhtml_47app47views47issues47_history46rhtml'
app/views/issues/_history.rhtml:1:in `each'
app/views/issues/_history.rhtml:1:in `_run_rhtml_47app47views47issues47_history46rhtml'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:390:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:390:in `compile_and_render_template'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:366:in `render_template'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:316:in `render_file'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:331:in `render'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/partials.rb:120:in `render_partial'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:352:in `render'
app/views/issues/show.rhtml:87:in `_run_rhtml_47app47views47issues47show46rhtml'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:390:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:390:in `compile_and_render_template'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:366:in `render_template'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:316:in `render_file'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:1110:in `render_for_file'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:861:in `render_with_no_layout'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/layout.rb:261:in `render_without_benchmark'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:51:in `render'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:51:in `render'
app/controllers/issues_controller.rb:106:in `show'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/mime_responds.rb:131:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/mime_responds.rb:131:in `custom'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/mime_responds.rb:156:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/mime_responds.rb:156:in `respond'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/mime_responds.rb:150:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/mime_responds.rb:150:in `respond'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/mime_responds.rb:107:in `respond_to'
app/controllers/issues_controller.rb:105:in `show'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:1168:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:1168:in `perform_action_without_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/filters.rb:697:in `call_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/caching.rb:678:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/query_cache.rb:8:in `cache'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/caching.rb:677:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:524:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:524:in `process_without_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/session_management.rb:123:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:388:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/dispatcher.rb:171:in `handle_request'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/dispatcher.rb:115:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/dispatcher.rb:9:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/webrick_server.rb:112:in `handle_dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/webrick_server.rb:78:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/webrick_server.rb:62:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/commands/servers/webrick.rb:66
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:496:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:342:in `new_constants_in'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:496:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/commands/server.rb:39
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
script/server:3

Request

Parameters:

{"id"=>"24"}

Show session dump
--- 
:per_page: 100
:user_id: 8
:query: 
  :filters: 
    status_id: 
      :values: 
      - "" 
      :operator: o
  :project_id: 3
issuesindex_sort: 
  :order: desc
  :key: issue_statuses.position
flash: !map:ActionController::Flash::FlashHash {}

Response

Headers:

{"cookie"=>[],
 "Content-Type"=>"text/html",
 "Cache-Control"=>"no-cache"}

Any thoughts/suggestions would greatly be appreciated!

RE: Upgrade from v0.6.1 to v0.7.0 RC1 - 500 Error - Added by Jean-Philippe Lang over 16 years ago

Could you run this query on your Redmine database and post the exact result ?

SELECT journalized_type FROM journals WHERE journalized_id = 24

RE: Upgrade from v0.6.1 to v0.7.0 RC1 - 500 Error - Added by Ian Tyndall over 16 years ago

Thanks for the response!

The result of the query is 24 rows with the same value of "Issue".

RE: Upgrade from v0.6.1 to v0.7.0 RC1 - 500 Error - Added by Jean-Philippe Lang over 16 years ago

None of them have "issue" instead of "Issue" ?

RE: Upgrade from v0.6.1 to v0.7.0 RC1 - 500 Error - Added by Ian Tyndall over 16 years ago

Wow, great catch! After updating the records to "Issue", we can view the issue normally.

After updating this, I found 53 more that I have to fix:

select distinct journalized_id, journalized_type from journals where BINARY journalized_type != 'Issue'

Any idea on how this occurred?

Thanks again!

RE: Upgrade from v0.6.1 to v0.7.0 RC1 - 500 Error - Added by Jean-Philippe Lang over 16 years ago

Any idea on how this occurred?

Maybe a manual insert/update in the database...

    (1-7/7)