Closed Bug 204104 Opened 17 years ago Closed 17 years ago

internal error in when searching for invalid keyword or an email with no email type specified


(Bugzilla :: Query/Bug List, defect)

Windows XP
Not set



Bugzilla 2.18


(Reporter: morgamic, Assigned: morgamic)



(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312

if you search for an invalid keyword, ThrowUserError is undefined in
because it is missing a &::.

also, while fixing this, i stumbled on a similar error found for the
ThrowUserError for a missing_email_type (message: You must specify one or more
fields in which to search for <tt>[% email FILTER html %]</tt>.)

if you add the &:: to both lines, everything works fine.  this is relative to
bug 178801, a resolved, similar issue with other ThrowUserError calls in

Reproducible: Always

Steps to Reproduce:
1. query.cgi
2. put in a non-existing keyword (foofooasdfasdf) OR search for an email without
selecting a type to search for
3. conduct search

Actual Results:  
internal server error (500)

Expected Results:  
it should display a user error message (red box) with the appropriate error
string as defined in /template/en/default/global/user-error.html.tmpl
Attached patch patch v1: obvious fix (obsolete) — Splinter Review
Attachment #122226 - Attachment is obsolete: true
Attachment #122227 - Flags: review+
Attachment #122227 - Flags: review+ → review?(justdave)
Comment on attachment 122227 [details] [diff] [review]
patch v2: obvious fix in the obvious fix

No, the correct fix is to |use Bugzilla::Exception;| at the top of the file -
this happened when I moved stuff arround earlier, but forgot the |use|.

I knew about this bug, but I thought I'd already fixed it. It obviously slipped
through the cracks, though
Attachment #122227 - Flags: review?(justdave) → review-
ok.  after some futher discussion with Bradley, it became apparent that adding
the &:: is pointless if we are going to be moving towards using

so, let's revamp our approach.	here is a patch that:

a) includes the |use Bugzilla::Error;| (not Exception)
b) subsequently removes all &::'s from calls to ThrowUserError

hopefully that will be a better remedy, and, considering the work Bradley is
doing elsewhere, a step in the right direction.
Attachment #122227 - Attachment is obsolete: true
Attachment #122230 - Flags: review?(bbaetz)
Comment on attachment 122230 [details] [diff] [review]
patch v3: use Bugzilla::Error, remove &::'s

This looks fine. r=bbaetz
Attachment #122230 - Flags: review?(bbaetz) → review+
-> patcher
Assignee: endico → mike.morgan
Ever confirmed: true
Target Milestone: --- → Bugzilla 2.18
Flags: approval?
Flags: approval? → approval+

Checking in Bugzilla/;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/,v  <--
new revision: 1.40; previous revision: 1.39
Closed: 17 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.