Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1365299 - After upgrade "undefined method `name' for nil:NilClass" when visiting dashboard (oscap widget)
After upgrade "undefined method `name' for nil:NilClass" when visiting dashbo...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: SCAP Plugin (Show other bugs)
6.2.0
Unspecified Unspecified
high Severity high (vote)
: 6.2.2
: Unused
Assigned To: orabin
jcallaha
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-08 16:43 EDT by Justin Sherrill
Modified: 2017-03-16 04:52 EDT (History)
9 users (show)

See Also:
Fixed In Version: rubygem-foreman_openscap-0.5.3.18-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-14 17:01:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 16123 None None None 2016-08-16 06:50 EDT
Red Hat Product Errata RHBA-2016:1885 normal SHIPPED_LIVE Satellite 6.2.2 bug fix update 2016-09-14 20:57:56 EDT

  None (edit)
Description Justin Sherrill 2016-08-08 16:43:21 EDT
Description of problem:

Note this is very similar to https://bugzilla.redhat.com/show_bug.cgi?id=1361793 but has a different root cause.  

Here is the relevant traceback:

 | NoMethodError: undefined method `name' for nil:NilClass
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.5.3.17/app/views/dashboard/_compliance_host_reports_widget.html.erb:17:in `block in _ce5dd86c4d584c323b27dd0e36789817'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `each'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `each'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.5.3.17/app/views/dashboard/_compliance_host_reports_widget.html.erb:14:in `_ce5dd86c4d584c323b27dd0e36789817'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionview-4.1.5/lib/action_view/template.rb:145:in `block in render'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications.rb:161:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionview-4.1.5/lib/action_view/template.rb:339:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionview-4.1.5/lib/action_view/template.rb:143:in `render'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/deface-1.0.2/lib/deface/action_view_extensions.rb:41:in `render'

Given the code:

        <td><%= link_to h(report.policy.name), policy_dashboard_policy_path(report.policy) %></td>

It seems that there is a report without a defined policy


Version-Release number of selected component (if applicable):
6.2.0


How reproducible:
Always (on this satellite)

Steps to Reproduce:
Unclear

Actual results:
dashboard throws an error

Expected results:
Dashboard does not throw an error

Additional info:
Comment 3 orabin 2016-08-16 06:50:54 EDT
Created redmine issue http://projects.theforeman.org/issues/16123 from this bug
Comment 5 Bryan Kearney 2016-08-16 08:17:30 EDT
Upstream bug assigned to orabin@redhat.com
Comment 6 Bryan Kearney 2016-08-16 08:17:34 EDT
Upstream bug assigned to orabin@redhat.com
Comment 7 Bryan Kearney 2016-08-17 12:17:17 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/16123 has been closed
Comment 10 jcallaha 2016-09-09 09:18:59 EDT
Verified in Satellite 6.2.2 Snap 1.1. No issues encountered when loading the dashboard. OSCAP Widgets rendering properly and functioning as expected.
Comment 12 errata-xmlrpc 2016-09-14 17:01:47 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1885

Note You need to log in before you can comment on or make changes to this bug.