Project

General

Profile

Actions

Defect #42192

closed

Project settings members tab may raise ArgumentError if orphaned member records exist

Added by Mika Seppälä about 1 month ago. Updated 27 days ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hi,

after upgrading to 6.0.2, trying to open some project's settings cause http 500 error.
Some projects settings page opens normally, and there seems to be no visible differences between those opening, and those giving this error.
On 5.xx (and prior) versions every project open normally.

This might be related to this change on version 6.0.0

4. Icons have been replaced with SVG icons provided by Tabler (#23980):

Log:

I, [2025-01-20T11:24:11.137017 #1] INFO -- :  Completed 500 Internal Server Error in 484ms (ActiveRecord: 296.1ms (24 queries, 0 cached) | GC: 3.3ms)
F, [2025-01-20T11:24:11.137989 #1] FATAL -- : 
 ActionView::Template::Error (First argument has to be a Principal, was nil):

Causes:
 ArgumentError (First argument has to be a Principal, was nil)
   20:  <% next if member.new_record? %>
   21:  <tr id="member-<%= member.id %>" class="member">
   22:  <td class="name icon icon-<%= member.principal.class.name.downcase %>">
   23:   <%= principal_icon(member.principal) %>
   24:   <%= link_to_user member.principal %>
   25:  </td>
   26:  <td class="roles">

 app/helpers/icons_helper.rb:49:in `principal_icon'
 app/views/projects/settings/_members.html.erb:23
 app/views/projects/settings/_members.html.erb:19:in `each'
 app/views/projects/settings/_members.html.erb:19
 app/views/common/_tabs.html.erb:21
 app/views/common/_tabs.html.erb:20:in `each'
 app/views/common/_tabs.html.erb:20
 app/helpers/application_helper.rb:525:in `render_tabs'
 app/views/projects/settings.html.erb:3
 lib/redmine/sudo_mode.rb:78:in `sudo_mode'

Files

42192.patch (1.14 KB) 42192.patch Go MAEDA, 2025-01-30 10:33
Actions

Also available in: Atom PDF