Project

General

Profile

Actions

Bug #1052

closed

error when selecting medium

Added by Ohad Levy over 13 years ago. Updated over 13 years ago.

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

Description

While it seems harmless, the following error was in the log files:

Processing HostsController#medium_selected (for 10.35.1.213 at 2011-07-19 12:35:51) [POST]
  Parameters: {"action"=>"medium_selected", "authenticity_token"=>"3X4IzYHgBNMb7tJcDRlRbZfs0Fw9QyEVf7RQkaU5oa8=", "controller"=>"hosts", "host"=>{"use_image"=>"undefined", "medium_id"=>"3", "operatingsystem_id"=>"16"}}

ActionView::TemplateError (undefined method `name' for nil:NilClass) on line #8 of app/views/common/os_selection/_image_details.html.erb:
5:     <%= check_box_tag type + "[use_image]", 1, item.use_image, :id => type + "_cb_use_image" -%>
6:   </span>
7:   <%= label_tag "#{item}_image_file", "Image filename",  :class => "span-4" -%>
8:   <%= image_file_entry item-%>
9:   <%= observe_field type + "_cb_use_image",
10:     :url => { :action => :use_image_selected },
11:     :with => "'#{type}[use_image]=' + value + '&#{type}[medium_id]=' + $('##{type}_medium_id').attr('value') + '&#{type}[operatingsystem_id]=' + $('##{type}_operatingsystem_id').attr('value') + '&#{type}[architecture_id]=' + $('##{type}_architecture_id').attr('value')" 

    app/models/host_common.rb:55:in `default_image_file'
    app/helpers/hosts_and_hostgroups_helper.rb:55:in `image_file_entry'
    app/views/common/os_selection/_image_details.html.erb:8
    lib/foreman/controller/host_details.rb:17:in `medium_selected'

Actions

Also available in: Atom PDF