Bug #6830
closedupgrade 1.4.5 to 1.5.2 results in "Invalid search query" error
Description
I updated from 1.4.5 to 1.5.2. After the upgrade the following error occured when starting foreman:
Validation failed: Search Invalid search query: Field 'compute_resource_id' not recognized for searching! (ActiveRecord::RecordInvalid)
After commenting out this line Foreman started: https://github.com/theforeman/foreman/blob/1.5-stable/app/models/filter.rb#L47
Updated by Dominic Cleal over 10 years ago
I think what's happening is we're creating a filter during DB migration (for 1.4 to 1.5 auth changes) and this is invalid.
Updated by Dominic Cleal over 10 years ago
As a workaround, comment out this line in /usr/share/foreman/app/models/filter.rb, circa line 47:
validates_with ScopedSearchValidator
Updated by Jason Barnett over 10 years ago
Just to give you some feeback. I ran into this problem and commenting out `validates_with ScopedSearchValidator` worked to get around the issue.
Updated by Joshua Hoblitt over 10 years ago
I hit the same issue upgrading from 1.4 to the 1.5.2-1 RPMs. Commenting line 47 in filer.rb also fixed it.
Updated by Dominic Cleal over 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 48c69213e70e1bc697b4a5487652549a8757a7a0.
Updated by Glen Ogilvie over 10 years ago
Thanks for the fix.. I was also affected.