Project

General

Profile

Actions

Defect #10053

closed

undefined method `<=>' for nil:NilClass when accessing the settings of a project

Added by Jordi Clariana about 12 years ago. Updated about 12 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hi,

I have this error when I access a specific project:

ActionView::TemplateError (undefined method `<=>' for nil:NilClass) on line #3 of app/views/projects/settings/_members.rhtml:
1: <%= error_messages_for 'member' %>
2: <% roles = Role.find_all_givable
3:    members = @project.member_principals.find(:all, :include => [:roles, :principal]).sort %>
4: 
5: <div class="splitcontentleft">
6: <% if members.any? %>

    app/models/member.rb:53:in `<=>'
    app/views/projects/settings/_members.rhtml:3:in `sort'
    app/views/projects/settings/_members.rhtml:3:in `_run_rhtml_app47views47projects47settings47_members46rhtml_locals_members_object_tab'
    app/views/common/_tabs.rhtml:24:in `_run_rhtml_app47views47common47_tabs46rhtml_locals_object_tabs'
    app/views/common/_tabs.rhtml:23:in `each'
    app/views/common/_tabs.rhtml:23:in `_run_rhtml_app47views47common47_tabs46rhtml_locals_object_tabs'
    app/helpers/application_helper.rb:204:in `render_tabs'
    app/views/projects/settings.rhtml:3:in `_run_rhtml_app47views47projects47settings46rhtml'

Rendering /data/www/redmine/public/500.html (500 Internal Server Error)

I have found this old issue: http://www.redmine.org/issues/4563, but executing:

ruby /var/www/redmine/script/runner -e production "Member.find(:all, :include => [:roles, :principal]).select {|m| m.roles.empty? || m.principal.nil?}"

do not return anything.

Am I doing something wrong or is this actually a bug?
If this is a DB problem, can you point me how to fix it?

Thanks.


Related issues

Related to Redmine - Defect #32704: ActionView::Template::Error (undefined method `position' for nil:NilClass):Closed

Actions
Actions

Also available in: Atom PDF