Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1262768

Summary: UI raises error: undefined local variable or method `include_javascript' on selecting job templates
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: WebUIAssignee: Ivan Necas <inecas>
WebUI sub component: Foreman QA Contact: Corey Welton <cwelton>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified CC: bbuckingham, cwelton, mhulan
Version: NightlyKeywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/11759
Whiteboard: Verified in Upstream
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 08:56:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
on selecting job templates from hosts menu raises error NameError: undefined local variable or method
none
foreman-debug none

Description Sachin Ghai 2015-09-14 09:56:40 UTC
Created attachment 1073167 [details]
on selecting job templates from hosts menu raises error NameError: undefined local variable or method

Description of problem:
I was trying to test remote execution on rhel7 and installed all required plugins. However when I go to hosts -> job templates via webUI, following error raised :

 Warning!
undefined local variable or method `include_javascript' for #<#<Class:0x0000000f0eee80>:0x0000000ed073d0>

production.log:
-------------------
 | Started GET "/job_templates" for 10.65.193.85 at 2015-09-14 05:45:58 -0400
2015-09-14 05:45:58 [app] [I] Processing by JobTemplatesController#index as HTML
2015-09-14 05:45:58 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.0.5/app/views/job_templates/index.html.erb within layouts/application (20.0ms)
2015-09-14 05:45:58 [app] [W] Action failed
 | NameError: undefined local variable or method `include_javascript' for #<#<Class:0x0000000f0eee80>:0x0000000ed073d0>
 | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.0.5/app/views/job_templates/index.html.erb:1:in `_c8aa79242155dc09695526ec9f787af2'
 | /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
 | /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
 | /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/deface-1.0.1/lib/deface/action_view_extensions.rb:41:in `render'


Version-Release number of selected component (if applicable):
tfm-rubygem-foreman_remote_execution-0.0.5-1.fm1_10.el7.noarch
tfm-rubygem-foreman-tasks-0.7.3-2.fm1_10.el7.noarch
foreman-1.10.0-0.develop.201509101902gita265235.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. katello-installer --enable-foreman-plugin-tasks
2. yum install -y tfm-rubygem-foreman_remote_execution rubygem-smart_proxy_remote_execution_ssh
3. Restart services
service httpd restart
service foreman-tasks restart
service foreman-proxy restart
4. Generate the key where smart-proxy
5. re-run the service foreman-proxy restart

Actual results:
| NameError: undefined local variable or method `include_javascript' for #<#<Class:0x0000000f0eee80>:0x0000000ed073d0>

Expected results:
job templates should be opened up without any issue

Additional info:

Comment 2 Sachin Ghai 2015-09-14 10:02:23 UTC
Created attachment 1073168 [details]
foreman-debug

Comment 4 Marek Hulan 2015-09-14 15:28:16 UTC
Upstream was closed as duplicate, it's http://projects.theforeman.org/issues/11759 which is planed to be fixed in 0.0.6

Comment 5 Tazim Kolhar 2015-10-21 09:43:02 UTC
*** This bug is verified in upstream.  This fix should eventually land in future downstream builds ***
Version Tested:

# rpm -qa  | grep foreman
nec-em17.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
foreman-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch
nec-em17.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510071112git33fd59b.el7.noarch
foreman-debug-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-release-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-postgresql-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-vmware-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch
tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch
tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch
foreman-release-scl-1-1.el7.x86_64
foreman-libvirt-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch
foreman-ovirt-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch
tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch
nec-em17.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch
tfm-rubygem-foreman_discovery-4.1.0-1.fm1_10.el7.noarch
tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch
foreman-proxy-1.11.0-0.develop.201510120849git5f36f2e.el7.noarch
foreman-compute-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch
foreman-gce-1.11.0-0.develop.201510121538gitb6b977a.el7.noarch

steps:
1. katello-installer --enable-foreman-plugin-tasks
2. yum install -y tfm-rubygem-foreman_remote_execution rubygem-smart_proxy_remote_execution_ssh
3. Restart services
service httpd restart
service foreman-tasks restart
service foreman-proxy restart
4. Generate the key where smart-proxy
5. re-run the service foreman-proxy restart

able to access job templates without any issue

Comment 6 Bryan Kearney 2015-11-13 19:03:00 UTC
Upstream bug assigned to inecas

Comment 10 errata-xmlrpc 2016-07-27 08:56:00 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.

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