Project

General

Profile

Actions

Bug #1358

closed

Postgresql issue when selecting the hosts column under classes

Added by Ashley Penney over 12 years ago. Updated over 11 years ago.

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

Description

If you select the number of hosts in the column hosts when browsing classes you get:

Processing HostsController#index (for 10.45.62.2 at 2011-11-28 13:05:36) [GET]
Parameters: {"action"=>"index", "controller"=>"hosts", "search"=>"class = postgres::server"}
PGError: ERROR: syntax error at or near ")"
LINE 1: SELECT * FROM "hosts" WHERE (()) ORDER BY "hosts"."name" AS...
^
: SELECT * FROM "hosts" WHERE (()) ORDER BY "hosts"."name" ASC LIMIT 20 OFFSET 0
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:520:in `execute'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1002:in `select_raw'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:989:in `select'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:665:in `find_by_sql'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:1582:in `find_every'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:619:in `find'
/usr/share/foreman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:82:in `send'
/usr/share/foreman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:82:in `paginate'
/usr/share/foreman/vendor/plugins/will_paginate/lib/will_paginate/collection.rb:85:in `create'
/usr/share/foreman/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:76:in `paginate'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/named_scope.rb:186:in `send'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/named_scope.rb:186:in `method_missing'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/base.rb:2182:in `with_scope'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/named_scope.rb:118:in `__send__'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/named_scope.rb:118:in `with_scope'
/usr/share/foreman/vendor/rails/activerecord/lib/active_record/named_scope.rb:179:in `method_missing'
/usr/share/foreman/app/controllers/hosts_controller.rb:35:in `index'
/usr/share/foreman/app/controllers/hosts_controller.rb:33:in `index'
Rendering template within layouts/application
Rendering common/500 (500)

This is with:

postgresql-server-8.4.9-1.el6_1.1.x86_64
postgres (0.7.9.2008.01.28)

I upgraded the gem to "pg" instead but the issue remains.

Actions #1

Updated by Joshua Hoblitt over 12 years ago

What version of activerecord do you have installed? The gem(s) for 3.1.x break storeconfigs under puppet and may have other issues as well.

Actions #2

Updated by Ohad Levy about 12 years ago

can you reproduce it? I was unable to...

Actions #3

Updated by Ohad Levy about 12 years ago

  • Status changed from New to Need more information
Actions #4

Updated by Benjamin Papillon almost 12 years ago

Hello,

Can you still reproduce the problem?
Can you provide the informations previous people asked?

Actions #5

Updated by Benjamin Papillon over 11 years ago

  • Status changed from Need more information to Closed
  • Target version set to Bug scrub

Hello,

Due to lack of update we are closing this bug.
Please, reopen it if you still have the problem with newer builds.

Actions

Also available in: Atom PDF