Closed Bug 204592 Opened 17 years ago Closed 17 years ago

invalid column name error (2.17.3 > 2.17.4)

Categories

(Bugzilla :: Query/Bug List, defect, P1, blocker)

2.17.4
defect

Tracking

()

VERIFIED FIXED
Bugzilla 2.18

People

(Reporter: spier, Assigned: bbaetz)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4b) Gecko/20030505 Camino/0.7+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4b) Gecko/20030505 Camino/0.7+

I've been evaluating as of 2.17.3. Recently upgraded to 2.17.4 via cvs update.

I got following error, when I try new query or preset queries.

//
The custom sort order specified in your cookie contains an invalid column name
map_assigned_to.login_name%2Cbugs.bug_status%2C%20bugs.priority%2C%20map_assigned_to.login_name%2C%20bugs.bug_id.
The cookie has been cleared. 
//

Strangely, this happens on Safari & Camino under Mac OS X.

Any idea?

Reproducible: Always

Steps to Reproduce:
1. Upgrade existing 2.17.3 installation (2.17.3 db&data included) via cvs update
2. Throw a query (using Safari/Camino/IE5.2/Mozilla1.3 on OSX)


Actual Results:  
The following error

//The custom sort order specified in your cookie contains an invalid column name
map_assigned_to.login_name%2Cbugs.bug_status%2C%20bugs.priority%2C%20map_assigned_to.login_name%2C%20bugs.bug_id.
The cookie has been cleared.//

I got this all the time.

Expected Results:  
Safari/Camino/IE5.2/Mozilla1.3 on OSX should show same result.
Query on Safari/Camino failed, bug succeeded on IE/Mozilla.
Never seen this on 2.17.3.
I tried 2.17.4 tarball and latest cvs tip.
Version: unspecified → 2.17.4
The symptom is the same with all Mac-browsers.
It occurs on IE5, Mozilla1.3, Camino and Safari b2 under Mac OS X.
Severity: normal → major
Mine. Bleh.

This is fallout from CGI.pm conversion, and the backwards compat code.
Assignee: zach → bbaetz
Severity: major → blocker
Status: UNCONFIRMED → NEW
Component: Installation & Upgrading → Query/Bug List
Ever confirmed: true
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.18
Attached patch don't double quote (obsolete) — Splinter Review
CGI.pm quotes for us.
Comment on attachment 122648 [details] [diff] [review]
don't double quote

myk, can you look at this one? Quick and obvious.
Attachment #122648 - Flags: review?(myk)
Comment on attachment 122648 [details] [diff] [review]
don't double quote

This looks right, but it doesn't work for me.  After I apply the patch on my
tip install I still get the same error:

The custom sort order specified in your cookie contains an invalid column name
bugs.delta_ts%2C%20bugs.bug_status%2C%20bugs.priority%2C%20map_assigned_to.logi
n_name%2C%20bugs.bug_id. The cookie has been cleared.
Attachment #122648 - Flags: review?(myk) → review-
myk: try again. Its the value in the browser which is wrong and the code
correctly complains about it.

So apply this, get the cookie cleared, then try again. You may need to select
'importance' from the query.cgi page to get a multi-valued entry in there, or
something.
Status: NEW → ASSIGNED
OS: MacOS X → All
Hardware: Macintosh → All
myk said that that didn't help him, but it fixed it for me. Myk, can you grab
the headers being sent, and see what cookie stuff is actually being set?
The patch worked for me. Good work Bradley.

As an aside, I think that if the error message states :

"The custom sort order specified in your cookie contains an invalid column name 
bugs.bug_severity%2Cbugs.priority. The cookie has been cleared."

then the cookie should _really_ be cleared... Which it was not for me, and 
apparently was not for Myk either. I had to wipe my Bugzilla cookie manually 
before the patch would make any difference.
If theres no -value argument, then CGI.pm will try to fetch the cookie, not
send it.

Since we already have a separate send_cookie function, use that instead, and
move the path setting stuff down into it, removing the need to override
->cookie at all.

(Note that if you have a bogus LASTORDER cookie set for /, then we never clear
it, since we send /bugzilla/, or whatever the param is. Thats nt an artifact of
this patch, though)
Attachment #122648 - Attachment is obsolete: true
Comment on attachment 122746 [details] [diff] [review]
fix clearing cookies too

myk, take 2? Still nice and simple, really.

(This latter part is only needed post-2.17.4, for anyone who wants to fix their
existing 2.17.4 install. Not that the first part applies to 2.17.4 anyway, mind
you)
Attachment #122746 - Flags: review?(myk)
Comment on attachment 122746 [details] [diff] [review]
fix clearing cookies too

>+    # Use CGI::Cookie directly, because CGI.pm's |cookie| method gives the
>+    # current value if there isn't a -value attribute, which happens when
>+    # we're expiring an entry.

Nit: CGI.pm's |cookie| method no longer exists, so it doesn't make sense to
talk about it in a comment.

Otherwise, looks good and works, plus it uses more standard functionality
instead of rolling our own, which is good. r=myk
Attachment #122746 - Flags: review?(myk) → review+
Flags: approval+
Just tried the second patch on another install (first one was running on Win32,
this one is on my Linux machine at home) and it seems to work great. Including
the cookie clearing part.
Whiteboard: [regression]
Keywords: regression
Whiteboard: [regression]
> Nit: CGI.pm's |cookie| method no longer exists, so it doesn't make sense to
> talk about it in a comment.

No, CGI.pm's cookie method exist; I removed Bugzilla::CGI's cookie method override.

Checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
The first patch worked for me.

Thanks for all your immediate response.
Status: RESOLVED → VERIFIED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.