Project

General

Profile

Actions

Bug #12239

open

Scoped search errors when searching on certain fields

Added by John Mitsch over 8 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Web UI
Target version:
Difficulty:
hard
Triaged:
Fixed in Releases:
Found in Releases:

Description

on searching environment or OS in content host using scoped search, I see errors, this may be similar for searching on other models.

to reproduce add or uncomment in app/models/katello/system.rb

scoped_search :in => :environment, :on => :name, :complete_value => true, :rename => :environment

and then type environment = in content host search box in the UI

It is expected that the user can search on these fields

Traceback:

2015-10-21T08:35:58 [app] [I] Started GET "/katello/api/v2/systems/auto_complete_search?organization_id=14&page=1&search=++os+%3D&sort_
by=name&sort_order=ASC" for 192.168.121.1 at 2015-10-21 08:35:58 -0400
2015-10-21T08:35:58 [app] [I] Processing by Katello::Api::V2::SystemsController#auto_complete_search as JSON
2015-10-21T08:35:58 [app] [I] Parameters: {"organization_id"=>"14", "page"=>"1", "search"=>" os =", "sort_by"=>"name", "sort_order"=

"ASC", "api_version"=>"v2"}

2015-10-21T08:35:58 [app] [D] Setting current user thread-local variable to Admin User
2015-10-21T08:35:58 [app] [E] NoMethodError: undefined method `klass' for nil:NilClass | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/definition.rb:62:in `klass' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/definition.rb:82:in `column' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/definition.rb:96:in `type' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/definition.rb:214:in `block in default_fields_for
' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/definition.rb:214:in `select' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/definition.rb:214:in `default_fields_for' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/query_builder.rb:416:in `to_sql' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/query_builder.rb:51:in `build_find_params' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/query_builder.rb:22:in `build_query' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/auto_complete_builder.rb:87:in `is_query_valid' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/auto_complete_builder.rb:37:in `build_autocomplet
e_options' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/auto_complete_builder.rb:21:in `auto_complete' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/scoped_search-3.2.2/lib/scoped_search/definition.rb:274:in `complete_for' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/relation/delegation.rb:14:in `block in complete_f
or' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/relation.rb:241:in `block in scoping' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/scoping.rb:98:in `with_scope' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/relation.rb:241:in `scoping' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/relation/delegation.rb:14:in `complete_for' | /home/vagrant/katello/app/controllers/katello/concerns/filtered_auto_complete_search.rb:11:in `auto_complete_search' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_controller/metal/implicit_render.rb:4:in `send_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/abstract_controller/base.rb:167:in `process_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_controller/metal/rendering.rb:10:in `process_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb:18:in `block in process_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:551:in `block (5 levels) in run_
4457501345904244268__process_action__108380502906868136__callbacks' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_call
back_around_17987' | /home/vagrant/foreman/app/controllers/api/v2/base_controller.rb:151:in `disable_json_root' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_arou
nd_17987' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:528:in `block (4 levels) in run_
4457501345904244268__process_action__108380502906868136__callbacks' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_call
back_around_17986' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:326:in `around' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:310:in `_callback_around_15688' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_arou
nd_17986' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:516:in `block (3 levels) in run_
4457501345904244268__process_action__108380502906868136__callbacks' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_call
back_around_17985' | /home/vagrant/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_arou
nd_17985' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:515:in `block (2 levels) in run_
4457501345904244268__process_action__108380502906868136__callbacks' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_call
back_around_17984' | /home/vagrant/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_arou
nd_17984' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:448:in `block in run_44575013459
04244268__process_action__108380502906868136__callbacks' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_call
back_around_17983' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:326:in `around' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:310:in `_callback_around_13' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_arou
nd_17983' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:414:in `_run__4457501345904244268_
process_action_108380502906868136__callbacks' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_process_action_callba
cks' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb:17:in `process_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_controller/metal/rescue.rb:29:in `process_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:30:in `block in proces
s_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `block in instrument' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb:20:in `instrument' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `instrument' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:29:in `process_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.21/lib/active_record/railties/controller_runtime.rb:18:in `process_action' | /home/vagrant/katello/app/controllers/katello/concerns/api/api_controller.rb:47:in `process_action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/abstract_controller/base.rb:121:in `process' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/abstract_controller/rendering.rb:45:in `process' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_controller/metal.rb:203:in `dispatch' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_controller/metal.rb:246:in `block in action' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:73:in `call' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' | /home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:36:in `call'

Actions #1

Updated by John Mitsch over 8 years ago

  • Subject changed from Scoped search errors on some certain fields to Scoped search errors when searching on certain fields
Actions #2

Updated by Eric Helms over 8 years ago

  • translation missing: en.field_release set to 86
  • Triaged changed from No to Yes
Actions #3

Updated by Eric Helms about 8 years ago

  • translation missing: en.field_release changed from 86 to 144
Actions #4

Updated by Eric Helms almost 8 years ago

  • translation missing: en.field_release changed from 144 to 168
Actions #5

Updated by Eric Helms almost 8 years ago

  • translation missing: en.field_release deleted (168)
Actions #6

Updated by Justin Sherrill almost 8 years ago

  • Priority changed from Normal to Low
  • translation missing: en.field_release set to 114
  • Difficulty set to hard
Actions

Also available in: Atom PDF