Project

General

Profile

Actions

Defect #22581

closed

Version 3.2.1. and on Version 3.2.0. add new custom field creates internal server error

Added by maximilian gablinger about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

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:

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'

Files

Ohne Titel.tiff (66.4 KB) Ohne Titel.tiff maximilian gablinger, 2016-05-19 16:52
Ohne Titel 2.tiff (68.5 KB) Ohne Titel 2.tiff maximilian gablinger, 2016-05-19 16:53
Actions #1

Updated by Toshi MARUYAMA about 8 years ago

  • Description updated (diff)
Actions #2

Updated by Toshi MARUYAMA about 8 years ago

  • Status changed from New to Needs feedback
Actions #3

Updated by maximilian gablinger about 8 years ago

Environment:
Redmine version 3.1.1.stable
Ruby version 2.1.5-p273 (2014-11-13) [x86_64-linux]
Rails version 4.2.4
Environment production
Database adapter Mysql2 mariadb Version : mysqld Ver 10.1.13-MariaDB-1~trusty for debian-linux-gnu on x86_64 (mariadb.org binary distribution)
SCM:
Subversion 1.8.8
Git 1.9.1
Filesystem
Redmine plugins:
redmine_my_page 0.1.7

Actions #4

Updated by Toshi MARUYAMA about 8 years ago

Try without plugin.
There is same error: 500 error when trying to create custom fields.

Actions #5

Updated by maximilian gablinger almost 8 years ago

I have the same issue on the dev System with disabled plugin.

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.

If you are the Redmine administrator, check your log files for details about the error.

Actions #6

Updated by Toshi MARUYAMA almost 8 years ago

MariaDB is not supported.

Actions #7

Updated by maximilian gablinger almost 8 years ago

I created a separate DB with original mysql server on a separate maschine and the error happens again.
So the same issue is still appearing.
It doesn't seem to be a database issue.

Actions #8

Updated by maximilian gablinger almost 8 years ago

See below:

Started GET "/custom_fields/new?utf8=%E2%9C%93&type=IssueCustomField" for 10.242.2.30 at 2016-05-19 16:51:51 +0200
Processing by CustomFieldsController#new as HTML
Parameters: {"utf8"=>"✓", "type"=>"IssueCustomField"}
Current user: admin (id=1)
Rendered custom_fields/formats/_regexp.html.erb (1.6ms)
Rendered custom_fields/formats/_string.html.erb (7.4ms)
Rendered custom_fields/_form.html.erb (64.8ms)
Rendered custom_fields/new.html.erb within layouts/admin (67.5ms)
Completed 500 Internal Server Error in 87ms (ActiveRecord: 4.7ms)

ActionView::Template::Error (undefined method `accessor' for #<ActiveRecord::Type::Value:0x007f46027def98>):
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___3817734141627673232_69969335926560'
app/helpers/custom_fields_helper.rb:66:in `render_custom_field_format_partial'
app/views/custom_fields/_form.html.erb:18:in `_app_views_custom_fields__form_html_erb__3652387640558589277_69969335760980'
app/views/custom_fields/new.html.erb:4:in `block in app_views_custom_fields_new_html_erb__2035185979488333688_69969335707720'
app/helpers/application_helper.rb:1030:in `labelled_form_for'
app/views/custom_fields/new.html.erb:3:in `_app_views_custom_fields_new_html_erb___2035185979488333688_69969335707720'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Actions #9

Updated by Toshi MARUYAMA almost 8 years ago

Try updating Ruby.

Actions #10

Updated by maximilian gablinger almost 8 years ago

ruby is already on Version ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
on this test-system.
On the production server it is on ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux].
So this is for sure not the problem.

Actions #11

Updated by Toshi MARUYAMA almost 8 years ago

maximilian gablinger wrote:

ruby is already on Version ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
on this test-system.

Ruby 2.3 is not supported.

On the production server it is on ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux].
So this is for sure not the problem.

Latest Ruby 2.1 is 2.1.10.
https://www.ruby-lang.org/en/news/2016/04/01/ruby-2-1-10-released/

Actions #12

Updated by maximilian gablinger almost 8 years ago

But it doesn't work on both systems ruby 2.3.0p0 and on 2.1.5p273. So it makes no sense to update the production system if this doesn't work on the dev system too.
The dev System in already on 2.3.0 as I wrote before. I want to make it run first on the dev system. Then I will for sure upgrade it on production.
As I wrote we inserted all data from production to the dev system and then the custom_field story did not work anymore. It only worked with factory loaded data.

Actions #13

Updated by Toshi MARUYAMA almost 8 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Cant reproduce

We cannot provide any technical support.
Test covers your case.
source:tags/3.2.2/test/functional/custom_fields_controller_test.rb#L75
Tests passes in all our support platforms.
http://www.redmine.org/builds/index.html

Actions

Also available in: Atom PDF