Defect #7985

Trying to do a bulk edit results in "Internal Error"

Added by Todd Courtnage over 10 years ago. Updated over 7 years ago.

Status:ClosedStart date:2011-03-24
Priority:NormalDue date:
Assignee:-% Done:


Category:Custom fields
Target version:1.1.3
Resolution:Fixed Affected version:1.1.2


When selecting multiple issues in the issue list, right clicking and selecting "Edit" from the context menu results in an "Internal Error" white screen.

The production.log shows this error:

Processing IssuesController#bulk_edit (for at 2011-03-24 11:33:44) [GET]
  Parameters: {"ids"=>["7606", "7607", "7689"], "action"=>"bulk_edit", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/bulk_edit

ActionView::TemplateError (undefined method `edit_as' for nil:NilClass) on line #51 of app/views/issues/bulk_edit.rhtml:
48: <% end %>
50: <% @custom_fields.each do |custom_field| %>
51:     <p><label><%= h( %></label> <%= custom_field_tag_for_bulk_edit('issue', custom_field) %></p>
52: <% end %>
54: <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>

    app/helpers/custom_fields_helper.rb:75:in `custom_field_tag_for_bulk_edit'
    app/views/issues/bulk_edit.rhtml:51:in `_run_rhtml_app47views47issues47bulk_edit46rhtml'
    app/views/issues/bulk_edit.rhtml:50:in `each'
    app/views/issues/bulk_edit.rhtml:50:in `_run_rhtml_app47views47issues47bulk_edit46rhtml'
    app/views/issues/bulk_edit.rhtml:5:in `_run_rhtml_app47views47issues47bulk_edit46rhtml'
    /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/command.rb:212:in `run'

Rendering /opt/redmine-1.1.2/public/500.html (500 Internal Server Error)

This was happening with Redmine 1.1.0 and continues to happen with Redmine 1.1.2. It had worked at some point in time previous to 1.1.0, but not sure what version.

Other info:
MySQL 5.1.49
Ruby 1.8.7
Rails 2.3.5

Associated revisions

Revision 5214
Added by Jean-Philippe Lang over 10 years ago

Fixed: unknown custom field format causes error when editing/bulk editing (#7985).


#1 Updated by Etienne Massip over 10 years ago

Do or did you use some plugin handling a new custom field type ?

#2 Updated by Jean-Philippe Lang over 10 years ago

  • Category changed from Issues to Custom fields
  • Status changed from New to Resolved
  • Target version set to 1.1.3
  • Resolution set to Fixed

It seems you have an unknown custom field format in your data. Can you run this query and report the result to make sure I'm not missing anything:

SELECT DISTINCT field_format FROM custom_fields

Anyway, it should not raise an error. It was introduced in r3675 and it's fixed in r5214.

#3 Updated by Todd Courtnage over 10 years ago

Hi Etienne and Jean-Philippe.

Yes, I did give the Google Docs plugin a whirl a while ago. And sure, enough:

mysql> SELECT DISTINCT field_format FROM custom_fields;
| field_format |
| string       |
| list         |
| text         |
| googledoc    |
4 rows in set (0.00 sec)

I have patched our Redmine with your fix, Jean-Philippe, and it now works.

Thanks a bunch!

#4 Updated by Jean-Philippe Lang over 10 years ago

  • Status changed from Resolved to Closed

Thanks for your feedback. Merged in 1.1-stable.

Also available in: Atom PDF