Project

General

Profile

Actions

Bug #2775

closed

Search in /compute_resource without "name =" raise 500 error

Added by Romain Vrignaud almost 11 years ago. Updated over 6 years ago.

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

Description

When searching "/compute_resources?utf8=✓&search=mycr" instead of "/compute_resources?utf8=✓&search=name=mycr"
raise 500 error.

In all other search fields when search column is not provided there is a fallback on "name"

Actions #1

Updated by Romain Vrignaud almost 11 years ago

  • Subject changed from Search in /compute_resource withou "name" raise 500 error to Search in /compute_resource without "name =" raise 500 error
Actions #2

Updated by Marek Hulán almost 11 years ago

I can confirm with scoped_search (2.5.1), the error is caused by ambigous column names

SQLite3::SQLException: ambiguous column name: type: SELECT  DISTINCT "compute_resources".id FROM "compute_resources" 
LEFT OUTER JOIN "taxable_taxonomies" ON "taxable_taxonomies"."taxable_id" = "compute_resources"."id" AND 
"taxable_taxonomies"."taxable_type" = 'ComputeResource' LEFT OUTER JOIN "taxonomies" ON "taxonomies"."id" = 
"taxable_taxonomies"."taxonomy_id" AND taxonomies.type='Location' LEFT OUTER JOIN "taxable_taxonomies" 
"taxable_taxonomies_compute_resources_join" ON "taxable_taxonomies_compute_resources_join"."taxable_id" = 
"compute_resources"."id" AND "taxable_taxonomies_compute_resources_join"."taxable_type" = 'ComputeResource' LEFT 
OUTER JOIN "taxonomies" "organizations_compute_resources" ON "organizations_compute_resources"."id" = 
"taxable_taxonomies_compute_resources_join"."taxonomy_id" AND taxonomies.type='Organization' WHERE 
(("taxonomies"."name" LIKE '%edna%' OR "taxonomies"."name" LIKE '%edna%' OR "compute_resources"."name" LIKE 
'%edna%')) ORDER BY type, name LIMIT 20 OFFSET 0

Actions #3

Updated by Tomer Brisker over 6 years ago

  • Status changed from New to Resolved

Tested with current develop branch (1.16) and this works.

Actions

Also available in: Atom PDF