Project

General

Profile

Actions

Defect #1569

closed

500 Internal error for some journal entries

Added by Vladymyr Vladymyrov almost 16 years ago. Updated almost 16 years ago.

Status:
Closed
Priority:
Normal
Category:
Projects
Target version:
-
Start date:
2008-07-03
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

I'm using the following configuration with redmine-0.7.1:

$ruby script/about
About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.1.1
Rails version             2.0.2
Active Record version     2.0.2
Action Pack version       2.0.2
Active Resource version   2.0.2
Action Mailer version     2.0.2
Active Support version    2.0.2
Edge Rails revision       rel_2-0-2
Application root          .../redmine-0.7.1-dev/redmine-0.7.1
Environment               development
Database adapter          mysql
Database schema version   92

And I receive Internal error when I try to open some issues http://localhost:3000/issues/show/29:

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.

Back

When I open same page in development mode I resieve the following trace:

NoMethodError in Issues#show 

Showing issues/_history.rhtml where line #11 raised: 
undefined method `length' for #<Enumerable::Enumerator:0xb671d9f8>

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 %>

Trace of template inclusion: /issues/show.rhtml

RAILS_ROOT: /home/vvlad/redmine/redmine-0.7.1-dev/redmine-0.7.1
Application Trace | Framework Trace | Full Trace 
vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb:50:in `truncate'
app/helpers/application_helper.rb:313:in `textilizable'
app/helpers/application_helper.rb:296:in `gsub'
app/helpers/application_helper.rb:296:in `textilizable'
app/helpers/journals_helper.rb:29: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:117:in `render_partial'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:26:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:26:in `benchmark'
vendor/rails/actionpack/lib/action_view/partials.rb:116: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'
/usr/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:106: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:105: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'
/usr/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'
/usr/lib/ruby/1.8/mongrel/rails.rb:76:in `process'
/usr/lib/ruby/1.8/mongrel/rails.rb:74:in `synchronize'
/usr/lib/ruby/1.8/mongrel/rails.rb:74:in `process'
/usr/lib/ruby/1.8/mongrel.rb:159:in `process_client'
/usr/lib/ruby/1.8/mongrel.rb:158:in `each'
/usr/lib/ruby/1.8/mongrel.rb:158:in `process_client'
/usr/lib/ruby/1.8/mongrel.rb:285:in `run'
/usr/lib/ruby/1.8/mongrel.rb:285:in `initialize'
/usr/lib/ruby/1.8/mongrel.rb:285:in `new'
/usr/lib/ruby/1.8/mongrel.rb:285:in `run'
/usr/lib/ruby/1.8/mongrel.rb:268:in `initialize'
/usr/lib/ruby/1.8/mongrel.rb:268:in `new'
/usr/lib/ruby/1.8/mongrel.rb:268:in `run'
/usr/lib/ruby/1.8/mongrel/configurator.rb:282:in `run'
/usr/lib/ruby/1.8/mongrel/configurator.rb:281:in `each'
/usr/lib/ruby/1.8/mongrel/configurator.rb:281:in `run'
/usr/lib/ruby/1.8/mongrel_rails:129:in `run'
/usr/lib/ruby/1.8/mongrel/command.rb:212:in `run'
/usr/lib/ruby/1.8/mongrel_rails:282
vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
vendor/rails/railties/lib/commands/servers/mongrel.rb:64
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/lib/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
script/server:3:in `require'
script/server:3
Request

Parameters: 
{"id"=>"29"}

Show session dump
--- 
:user_id: 3
:query: 
  :project_id: 1
  :filters: 
    status_id: 
      :values: 
      - "" 
      :operator: o
:return_to_params: 
issuesindex_sort: 
  :key: issues.id
  :order: desc
flash: !map:ActionController::Flash::FlashHash {}

Response

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

I was able to locate and isolate problem - it is because the following text I submitted to the Notes field:
I tested this text in http://demo.redmine.com - http://demo.redmine.org/issues/show/840 - it works.

Also I've copied database to my windows desktop and tested it there - it works fine. But on my target web server (Linux localhost 2.6.24-1-686 #1 SMP Thu May 8 02:16:39 UTC 2008 i686 GNU/Linux) it fails with 500 error.

For now I solved this by removing text which makes crash the application.
Could you please suggest how I can fix this on my target web server server?


Related issues

Is duplicate of Redmine - Defect #1526: Problem activity.Closed2008-06-25

Actions
Actions

Also available in: Atom PDF