Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1365299 - After upgrade "undefined method `name' for nil:NilClass" when visiting dashboard (oscap widget)
Summary: After upgrade "undefined method `name' for nil:NilClass" when visiting dashbo...
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: SCAP Plugin
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: 6.2
Assignee: orabin
QA Contact: jcallaha
Depends On:
TreeView+ depends on / blocked
Reported: 2016-08-08 20:43 UTC by Justin Sherrill
Modified: 2018-12-06 20:49 UTC (History)
9 users (show)

Fixed In Version: rubygem-foreman_openscap-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-09-14 21:01:47 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 16123 None None None 2016-08-16 10:50:57 UTC
Red Hat Product Errata RHBA-2016:1885 normal SHIPPED_LIVE Satellite 6.2.2 bug fix update 2016-09-15 00:57:56 UTC

Description Justin Sherrill 2016-08-08 20:43:21 UTC
Description of problem:

Note this is very similar to 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- `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- `_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(, 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):

How reproducible:
Always (on this satellite)

Steps to Reproduce:

Actual results:
dashboard throws an error

Expected results:
Dashboard does not throw an error

Additional info:

Comment 3 orabin 2016-08-16 10:50:54 UTC
Created redmine issue from this bug

Comment 5 Bryan Kearney 2016-08-16 12:17:30 UTC
Upstream bug assigned to

Comment 6 Bryan Kearney 2016-08-16 12:17:34 UTC
Upstream bug assigned to

Comment 7 Bryan Kearney 2016-08-17 16:17:17 UTC
Moving to POST since upstream bug has been closed

Comment 10 jcallaha 2016-09-09 13:18:59 UTC
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 21:01:47 UTC
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.

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