Defect #22581
Updated by Toshi MARUYAMA about 9 years ago
When I try to add a custom_field the result is an internal server error. Our production system is version 3.2.0. then I tried to upgrade this system from 3.2.0 to 3.2.1 in a testenvironment. It happened the same behavior. Again the internal Server error. When I installed Version 3.2.1 native without our data then it works fine. But we need our data. This is the redmine.log output: <pre> I, [2016-04-19T14:28:18.538655 #31226] INFO -- : Started GET "/custom_fields" for 10.242.2.42 at 2016-04-19 14:28:18 +0200 I, [2016-04-19T14:28:18.540342 #31226] INFO -- : Processing by CustomFieldsController#index as HTML I, [2016-04-19T14:28:18.544275 #31226] INFO -- : Current user: max.gablinger (id=83) I, [2016-04-19T14:28:18.547327 #31226] INFO -- : Rendered custom_fields/index.html.erb within layouts/admin (0.6ms) I, [2016-04-19T14:28:18.552676 #31226] INFO -- : Rendered admin/_menu.html.erb (4.9ms) I, [2016-04-19T14:28:18.568188 #31226] INFO -- : Rendered layouts/base.html.erb (15.2ms) I, [2016-04-19T14:28:18.568614 #31226] INFO -- : Completed 200 OK in 28ms (Views: 21.7ms | ActiveRecord: 1.6ms) I, [2016-04-19T14:28:23.440563 #31226] INFO -- : Started GET "/custom_fields/new" for 10.242.2.42 at 2016-04-19 14:28:23 +0200 I, [2016-04-19T14:28:23.442718 #31226] INFO -- : Processing by CustomFieldsController#new as HTML I, [2016-04-19T14:28:23.447456 #31226] INFO -- : Current user: max.gablinger (id=83) I, [2016-04-19T14:28:23.451739 #31226] INFO -- : Rendered custom_fields/select_type.html.erb within layouts/admin (2.1ms) I, [2016-04-19T14:28:23.457445 #31226] INFO -- : Rendered admin/_menu.html.erb (5.1ms) I, [2016-04-19T14:28:23.474245 #31226] INFO -- : Rendered layouts/base.html.erb (16.3ms) I, [2016-04-19T14:28:23.474717 #31226] INFO -- : Filter chain halted as :build_new_custom_field rendered or redirected I, [2016-04-19T14:28:23.474976 #31226] INFO -- : Completed 200 OK in 32ms (Views: 24.8ms | ActiveRecord: 1.6ms) I, [2016-04-19T14:28:27.375380 #31226] INFO -- : Started GET "/custom_fields/new?utf8=%E2%9C%93&type=IssueCustomField" for 10.242.2.42 at 2016-04-19 14:28:27 +0200 I, [2016-04-19T14:28:27.377806 #31226] INFO -- : Processing by CustomFieldsController#new as HTML I, [2016-04-19T14:28:27.378009 #31226] INFO -- : Parameters: {"utf8"=>"✓", "type"=>"IssueCustomField"} I, [2016-04-19T14:28:27.383201 #31226] INFO -- : Current user: max.gablinger (id=83) I, [2016-04-19T14:28:27.411212 #31226] INFO -- : Rendered custom_fields/formats/_regexp.html.erb (1.0ms) I, [2016-04-19T14:28:27.413224 #31226] INFO -- : Rendered custom_fields/formats/_string.html.erb (3.2ms) I, [2016-04-19T14:28:27.413394 #31226] INFO -- : Rendered custom_fields/_form.html.erb (6.2ms) I, [2016-04-19T14:28:27.413677 #31226] INFO -- : Rendered custom_fields/new.html.erb within layouts/admin (7.5ms) I, [2016-04-19T14:28:27.414061 #31226] INFO -- : Completed 500 Internal Server Error in 36ms (ActiveRecord: 1.0ms) F, [2016-04-19T14:28:27.417767 #31226] FATAL -- : ActionView::Template::Error (undefined method `accessor' for #<ActiveRecord::Type::Value:0x000000039f8320>): 1: <%= render :partial => 'custom_fields/formats/regexp', :locals => {:f => f, :custom_field => custom_field} %> 2: <p><%= f.check_box :text_formatting, {:label => :setting_text_formatting, :data => {:disables => '#custom_field_url_pattern'}}, 'full', '' %></p> 3: <p><%= f.text_field(:default_value) %></p> 4: <p><%= f.text_field :url_pattern, :size => 50, :label => :label_link_values_to %></p> lib/redmine/views/labelled_form_builder.rb:34:in `check_box' app/views/custom_fields/formats/_string.html.erb:2:in `_app_views_custom_fields_formats__string_html_erb__1606230260471594377_70355629062560' app/helpers/custom_fields_helper.rb:57:in `render_custom_field_format_partial' app/views/custom_fields/_form.html.erb:18:in `_app_views_custom_fields__form_html_erb__2568629039713508363_70355629215560' app/views/custom_fields/new.html.erb:6:in `block in _app_views_custom_fields_new_html_erb__1990438466245273424_70355629262800' app/helpers/application_helper.rb:1027:in `labelled_form_for' app/views/custom_fields/new.html.erb:5:in `_app_views_custom_fields_new_html_erb__1990438466245273424_70355629262800' lib/redmine/sudo_mode.rb:63:in `sudo_mode' </pre>