500 in NotificationController
Created by: exaexa
Hi everyone,
I'm getting this error 500 log message when clicking some user's notification settings:
Started GET "/profile/notifications" for 89.177.158.2 at 2014-11-20 15:14:35 +0100
Processing by Profiles::NotificationsController#show as HTML
Completed 500 Internal Server Error in 106ms
ActionView::Template::Error (undefined method `name' for nil:NilClass):
9: - if membership.kind_of? GroupMember
10: = link_to membership.group.name, membership.group
11: - else
12: = link_to_project(membership.project)
13: .pull-right
14: = form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do
15: = hidden_field_tag :notification_type, type, id: dom_id(membership, 'notification_type')
app/helpers/projects_helper.rb:8:in `block in link_to_project'
app/helpers/application_helper.rb:260:in `link_to'
app/helpers/projects_helper.rb:7:in `link_to_project'
app/views/profiles/notifications/_settings.html.haml:12:in `_app_views_profiles_notifications__settings_html_haml__3957680894545117918_69958985716620'
app/views/profiles/notifications/show.html.haml:55:in `block in _app_views_profiles_notifications_show_html_haml__4581528038015675877_69958985064020'
app/views/profiles/notifications/show.html.haml:53:in `_app_views_profiles_notifications_show_html_haml__4581528038015675877_69958985064020'
The issue happens only for several users, but persists since ~7.0 and it didn't go away with latest update.
I've been trying to dig into source code, but haven't made much sense from the whole thing. I'm not really sure this would be a bug because no one other reported this and suspected some database corruption, but affected user's data don't differ from unaffected users in any significant way.
Can anyone provide pointers for solving this?
Thanks a lot -mk