Project

General

Profile

Actions

Defect #33183

closed

Unable to edit user or group that has custom fields with text formatting enabled

Added by Go MAEDA about 4 years ago. Updated about 4 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Steps to reproduce:

1. Add a text format UserCustomField
2. Enable "Text formatting" for the custom field
3. Try to edit any user. You will see the Internal Server Error page

Completed 500 Internal Server Error in 145ms (ActiveRecord: 4.4ms)

ActionView::Template::Error (undefined method `project' for #<User:0x00007fafaefe19a0>
Did you mean?  projects
               projects=):
    18:   <% end %>
    19: 
    20:   <% @user.custom_field_values.each do |value| %>
    21:     <p><%= custom_field_tag_with_label :user, value %></p>
    22:   <% end %>
    23: 
    24:   <p><%= f.check_box :admin, :disabled => (@user == User.current) %></p>

app/helpers/custom_fields_helper.rb:89:in `custom_field_tag'
app/helpers/custom_fields_helper.rb:120:in `custom_field_tag_with_label'
app/views/users/_form.html.erb:21:in `block in _app_views_users__form_html_erb__1594929617543875487_70196358321500'
app/views/users/_form.html.erb:20:in `each'
app/views/users/_form.html.erb:20:in `_app_views_users__form_html_erb__1594929617543875487_70196358321500'
app/views/users/_general.html.erb:2:in `block in _app_views_users__general_html_erb___1757341575386637995_70196280622620'
app/helpers/application_helper.rb:1381:in `labelled_form_for'
app/views/users/_general.html.erb:1:in `_app_views_users__general_html_erb___1757341575386637995_70196280622620'
app/views/common/_tabs.html.erb:21:in `block in _app_views_common__tabs_html_erb__1281727382652852600_70196280567080'
app/views/common/_tabs.html.erb:20:in `each'
app/views/common/_tabs.html.erb:20:in `_app_views_common__tabs_html_erb__1281727382652852600_70196280567080'
app/helpers/application_helper.rb:457:in `render_tabs'
app/views/users/edit.html.erb:13:in `_app_views_users_edit_html_erb___3120376360499099218_70196265966740'
lib/redmine/sudo_mode.rb:64:in `sudo_mode'

Files

test_for_33183.patch (669 Bytes) test_for_33183.patch Marius BĂLTEANU, 2020-03-23 18:23

Related issues

Related to Redmine - Feature #31989: Inline issue auto complete (#) in fields with text-formatting enabledClosedGo MAEDA

Actions
Actions

Also available in: Atom PDF