Specific Search without search words yields invalid_column_name message, complaining about sort order "relevance desc"

RESOLVED FIXED in Bugzilla 4.4



Query/Bug List
6 years ago
4 years ago


(Reporter: Wurblzap, Assigned: Simon Green)



Bugzilla 4.4
Bug Flags:
approval +
approval4.4 +
blocking4.4.2 -




(1 attachment)



6 years ago
This is a regression, possibly by bug 297382.

Starting a Specific Search without search words yields an invalid_column_name message, stating "The custom sort order specified contains one or more invalid column names: relevance desc. They have been removed from the sort list."

This is because without search words, we don't address the fulltext index. So either we should, or if we don't, we shouldn't try to sort by relevance.

Comment 1

5 years ago
I also got the same error after upgrading bugzilla to version 4.4

Anyone knows how to fix this?



5 years ago
Severity: minor → normal
Flags: blocking4.4.2?

Comment 2

5 years ago
I don't see how this could be a blocker. The query executes correctly.
Flags: blocking4.4.2? → blocking4.4.2-

Comment 4

5 years ago
Sorry, if you mean the query as such, then yes, this is executed correctly, in the sense that the results are correct.

It's a regression, though, so usually that's a blocker.

Comment 5

5 years ago
(In reply to Marc Schumann [:Wurblzap] from comment #4)
> It's a regression, though, so usually that's a blocker.

We have many regressions which are not blockers, see yourself :)


Comment 6

5 years ago
Ok then...

Comment 7

4 years ago
you can do a Workaround so that ErrorMessage gets hide
if you comment out Line 688 @ buglist.cgi:

#    $vars->{'message'} = 'invalid_column_name';


Comment 8

4 years ago
This is still an issue. When there are no results it makes it appear as if my query didn't go through, which could be confusing to many people:



4 years ago
Severity: normal → minor

Comment 9

4 years ago
This error message is also appearing for me on a new bugzilla install (v 4.4.4)

I notice that it's only displaying this message on search results from the 'Simple search' tab, search results from the 'advanced search' tab appear OK

It appears that the culprit is the value of the "order" hidden field of the 'simple search' (query.cgi?format=specific) page:

  <input type="hidden" name="order" value="relevance desc">

as a workaround, I've created a custom simple search page by copying 




updated the hidden field to have the value "Importance" (i.e. same as the advanced search page), and ensuring the custom search page has correct file permissions. 

It would be better for the correct value of the order field to be set in the default template, though.


4 years ago
Assignee: query-and-buglist → sgreen

Comment 10

4 years ago
Created attachment 8472812 [details] [diff] [review]
Attachment #8472812 - Flags: review?(gerv)
screen: is sorting by Importance a different thing to sorting by "relevance desc"? Was the original value just bogus? Or has it stopped working at some point? What's the story here?

s/screen/sgreen/ :-)

Flags: needinfo?(sgreen)

Comment 13

4 years ago
(In reply to Gervase Markham [:gerv] from comment #11)
> screen: is sorting by Importance a different thing to sorting by "relevance
> desc"?


> Was the original value just bogus?

It appears so.

> Or has it stopped working at some
> point? What's the story here?

The change that made it start showing an error was bug 297382

  -- simon
Flags: needinfo?(sgreen)
Attachment #8472812 - Flags: review?(gerv) → review+
Flags: approval?


4 years ago
Flags: approval4.4?
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+

Comment 14

4 years ago
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   983287d..ace2e1a  master -> master

To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   7c8332d..e74616b  HEAD -> 4.4
Last Resolved: 4 years ago
Resolution: --- → FIXED

Comment 15

4 years ago
Sorry gerv, I marked myself as the reviewer on the master commit. It was an accident.
No worries :-)


Comment 17

4 years ago
Is it possible that some database columns have been renamed.
In version 4.4.5 I had to use
<input type="hidden" name="order" value="priority desc">
to get rid of the error message.

"priority" seems be what shows up on the bug detail screen as "Importance" unfortunately it is an alpha field so the order is misleading since it is not really in order of priority (unspecified "---" is ahead of "highest" ; "normal" is after "low".
Using "severity" would have the same problem.

I ended up just sorting on the bug_id 
<input type="hidden" name="order" value="bug_id">
which gets rid of the error and, at least, is an understandable sequence.

This should be fixed since it does show up in a highly visible place on the results screen and is a coding error.

Perhaps it was fixed once but somehow it is back in the latest version as fields changed name.

It would be nice if the query did a mapping of the alpha field "priority" into a number that matched the order in which the "Importance" drop down box shows the choices (Highest at the top and unspecified "---" at the bottom. Alternatively priority "Importance" could be made numeric and mapped on the way in and out.
You need to log in before you can comment on or make changes to this bug.