Hello everyone ,
I was working with this issue where the settings search bar returns “Error: status code: 500”
On debugging, it turned out that description column being removed from the settings table in this pr: https://github.com/theforeman/foreman/blob/develop/db/migrate/20220124174632_drop_setting_fields.rb
caused the issue of “Unknown Attribute error” for description.
A hack would be to remove description from the search field but that isn’t very user friendly.
So in this post, I would love to get your suggestion/advice on the possible solution for this issue.
If this already made it into a release (or multiple) it may also be valid to first disallow searching for the description. That at least allows searching for other things (like name), which is probably a safe cherry pick to a stable release. Then you can invest more time in a bigger solution.
I’m not sure if it’s a good approach, when it worked I used the description field for search quite a lot, usually I don’t know exactly what I’m looking for and therefore trying to search by some string that could be in the description. And it works quite well
It’s more about a short term solution: today you can’t search at all. If you remove the description from fields then you can at least search on other fields. Granted, it’s not as useful but it’s better than an internal server error. Then you can safely look at a proper solution. When I looked at it I thought it wasn’t a trivial change and it can take more time to resolve. But I’d be happily proven wrong by a patch that resolves it properly.