Project

General

Profile

Bug #10153

Missing JS File during host group edit

Added by Holger Neubauer over 5 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Web Interface
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

JS file not loaded

Error during opening the Activation Keys Tab
Error Message:

Uncaught ReferenceError: update_interface_table is not defined

Workaround to get it working:

Edit the base layout and add the line to load the javascript file which is missing:

vim app/views/layouts/base.html.erb

<%= javascript_include_tag 'host_edit_interfaces', "data-turbolinks-track" => true %>

Example:

<!DOCTYPE html>
<!--[if lt IE 7]>      <html lang="<%= I18n.locale %>" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html lang="<%= I18n.locale %>" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html lang="<%= I18n.locale %>" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="<%= I18n.locale %>" class="no-js"> <!--<![endif]-->
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title><%= h(yield(:title) || "Foreman") %></title>
    <meta name="description" content="">
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/>

    <%= favicon_link_tag "favicon.ico"%>

    <%= stylesheet_link_tag 'application', "data-turbolinks-track" => true %>
    <%= yield(:stylesheets) %>

    <%= csrf_meta_tags %>
    <%= javascript_include_tag 'application', "data-turbolinks-track" => true %>
    <%= javascript_include_tag 'host_edit_interfaces', "data-turbolinks-track" => true %>
    <%= yield(:javascripts) %>

Better solution would be to have an application.css file which includes the missing host_edit_interfaces.js from the katello-installer.
Seems the rake assets:precompile doesn't include this file.

Tested on: Version 1.8.0-RC3

view_activation_key.png View view_activation_key.png 209 KB Holger Neubauer, 04/16/2015 02:23 AM
View activation key

Related issues

Related to Foreman - Bug #14071: Missing host_edit_interfaces.js in taxonomy edit pageClosed2016-03-07
Has duplicate Katello - Bug #10184: Katello 2.2 Activation Keys won't save in host groupsDuplicate2015-04-17

Associated revisions

Revision 8844f307 (diff)
Added by Michael Moll over 5 years ago

Fixes #10153 - pull in host_edit_interfaces.js also in hostgroups

Revision db18b2c0 (diff)
Added by Michael Moll over 5 years ago

Fixes #10153 - pull in host_edit_interfaces.js also in hostgroups

(cherry picked from commit 8844f307df3b18ca26ce41f19e5ad6c769dacd36)

History

#1 Updated by Justin Sherrill over 5 years ago

  • Project changed from Katello to Foreman
  • Subject changed from Missing JS File during openning the activation keys tab to Missing JS File during host group edit
  • Category deleted (Installer)
  • Legacy Backlogs Release (now unused) changed from 23 to 28

This is actually a foreman issue and occurs regardless of the presences of katello or not.

update_interface_table() in the host_edit.js is being called when loading the new hostgroup form, yet is defined in host_edit_interfaces.js which is not loaded

#2 Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2310 added
  • Pull request deleted ()

#3 Updated by Eric Helms over 5 years ago

  • Has duplicate Bug #10184: Katello 2.2 Activation Keys won't save in host groups added

#4 Updated by Eric Helms over 5 years ago

Turns out this was also the cause of some deface breakages where we are adding a tab and some javascript to the hostgroup form (http://projects.theforeman.org/issues/10184)

#5 Updated by Anonymous over 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#6 Updated by Dominic Cleal over 5 years ago

  • Assignee set to Anonymous
  • Category set to Web Interface

#7 Updated by Ondřej Pražák over 4 years ago

  • Related to Bug #14071: Missing host_edit_interfaces.js in taxonomy edit page added

Also available in: Atom PDF