Project

General

Profile

Actions

Bug #12140

closed

scoped_search - err 500 on searching on invalid field

Added by roman plevka over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web UI
Target version:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1270855
Description of problem:
Applies to all katello entities:
on sending a query which uses a non-existing field, server returns error 500, but the GUI does not handle this error.
This results in 'dead' search form.

Request url:
https://<fqdn>/katello/api/v2/content_views?nondefault=true&organization_id=3&page=1&search=foo+%3D+bar&sort_by=name&sort_order=ASC

Response:
displayMessage:"Field 'foo' not recognized for searching!"
errors:Array:
0:"Field 'foo' not recognized for searching!"

Version-Release number of selected component (if applicable):
katello-2.4.0-6.nightly.el7.noarch
tfm-rubygem-scoped_search-3.2.2-2.el7.noarch

How reproducible:
every time on all katello entities

Steps to Reproduce:
1. go to a katello entity page (e.g. Content Views)
2. input the seaerch query with invalid field name - e.g. foo = bar
3. Hit search
4. No response on GUI (Error in the captured repsonse headers)

Actual results:
the error is not being handled by UI, renders the form unusable.

Expected results:
Notification is shown or some default behavior takes place.

Additional info:

Actions #1

Updated by Eric Helms over 8 years ago

  • Assignee set to John Mitsch
  • translation missing: en.field_release set to 70
  • Triaged changed from No to Yes
Actions #2

Updated by Eric Helms over 8 years ago

  • Status changed from New to Resolved

Testing this myself on latest, I am seeing the use of an invalid search term resulting in everything continuing to work just not returning any results. Going to move this to resolved for the time being -- if you see this again in testing of the GA release of 2.4 please re-open and we'll investigate.

Actions #3

Updated by roman plevka over 8 years ago

Eric Helms wrote:

Testing this myself on latest, I am seeing the use of an invalid search term resulting in everything continuing to work just not returning any results. Going to move this to resolved for the time being -- if you see this again in testing of the GA release of 2.4 please re-open and we'll investigate.

testing on:

# rpm -qa katello
katello-2.5.0-2.nightly.el7.noarch

The issue is still there.
just enter

foo = bar

into a search field and hit the search button.
Console spits out err 500, instead of results table, there is infinite spinner and no additional query works (not even clearing the search field and clicking the search button again).

Actions #4

Updated by John Mitsch over 8 years ago

and ISE on an unsupported query seems to only happen on certain pages; I am seeing it on Errata, content views, subscriptions, and gpg keys.

Actions #5

Updated by John Mitsch over 8 years ago

  • Status changed from Resolved to New

Re-opening since it is still able to be replicated

Actions #6

Updated by John Mitsch over 8 years ago

  • translation missing: en.field_release changed from 70 to 86
Actions #7

Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5691 added
Actions #8

Updated by roman plevka over 8 years ago

John Mitsch wrote:

and ISE on an unsupported query seems to only happen on certain pages; I am seeing it on Errata, content views, subscriptions, and gpg keys.

- It actually happens on all katello entity pages (activation keys, products, repositories, sync plans, puppet modules, etc.). These have been recently migrated from elastic search to scoped search. Only foreman entity pages handle this properly (they display error notification + the search_auto_complete displays the warning in the suggestion box).

Thanks for reopening

Actions #9

Updated by John Mitsch over 8 years ago

so I ran into something that may be causing some confusion (at least it did for me) If you enter foo = bar in a search box, the autocomplete will sometimes come up with a blank query and when you hit enter it sends that blank query, which does not cause the ISE. When you click the actual search button, it sends "foo = bar" in the params, and you can see the error. Just want to share to save anyone else a headache :)

Actions #10

Updated by John Mitsch about 8 years ago

  • Status changed from Ready For Testing to New
  • Pull request deleted (https://github.com/Katello/katello/pull/5691)

PR was closed

Actions #11

Updated by The Foreman Bot about 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5819 added
Actions #12

Updated by The Foreman Bot about 8 years ago

  • Pull request https://github.com/Katello/bastion/pull/97 added
Actions #14

Updated by John Mitsch about 8 years ago

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

Also available in: Atom PDF