To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.admin.generalOpen lugnet.admin.general in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Administrative / General / 8335
8334  |  8336
Subject: 
Re: error message!
Newsgroups: 
lugnet.admin.general
Date: 
Sun, 19 Nov 2000 17:41:21 GMT
Viewed: 
278 times
  
In lugnet.admin.general, Christian Gemuenden writes:
[...] I don't think that I entered an ASCII #0 character, I assume much more
that I 'opened' the set 2198 twice on the same page. Let me explain that:
I usually enter a lot of info at once, whenever I picked up a couple of sets
that are not listed as part of my collection. In order to upload all info
quickly, I simply put ALL set numbers into the 'LEGO Set Reference' Search
field so that I will see a page that shows excactly the sets I picked up,
for example:
http://guide.lugnet.com/set/?q=2805,+2806,+2198,+4990,+2198&v=a
The problem with this specific page was that it is listing 2198 twice as I
picked up two copies and therefor entered it twice in the same Search field.
[...]

Aha!  OK, then I see now how the ASCII 0 got there!  :-)  :-)  When the low-
level CGI stuff on the server receives two copies of the same field, it pastes
them together with and ASCII 0 separator into a single string.  In an HTML,
the only time you normally have two incoming field responses with the same
name is when you have a multiple-select list-box.  However, you've discovered
a new case:  when the same form is repeated on the same page (which is OK if
the incoming stuff handles it carefully, which it wasn't here).


Instead of submitting 'Own Public: 2' I must have entered 1 in both fields
(though a different private note) and it seems like the server mixed some
info up because of that.

It definitely got confused by the notes fields containing non-empty responses
for each of the instances of the set that was duplicated in your page view.
When it received the 1 and the 1 for the quantity, it would have pasted those
together to "1\0001" (where \000 is ASCII #0) and I think this should have
resulted in a 0 because "1\0001" isn't an integer.  I see some 11's (eleven)
in your data and I wonder if those are supposed to be 11 or if they are the
result of some other bug related to this.  I just tested with two sets and
put 1 and 1 in and I got empty (zero) rather than 11.


I'll better not 'test' again what happens when
entereing two different notes for one set at the same time, but you might
find a way to forbid it completely, maybe I'll be uncareful again one day.

It can't assume that you meant to add the numeric quantities together
(i.e., 1 + 1 = 2) because if you already have 2 and you view it again, you'd
get 2 + 2 = 4 if it appeared twice, or 2 + 2 + 2 = 6 if it appeared thrice.
If it gets conflicting data for a form field, it might as well handle the
subforms sequentially, which would mean honoring the first one or the last
one and ignoring the others.  Then, in the part that receives the list of
objects to display, it might as well remove any duplicates to prevent possible
confusion in the first place, making the duplicates a moot issue.

OK, just made that change.  So, for example, if you do...

   http://guide.lugnet.com/set/?q=711x,7110,7111&v=a

...then you see three matches (7110, 7111, 7115) instead of five (7110, 7111,
7115, 7110, 7111).


Again, thanks a lot for the support, maybe you'll think about my description
also. And don't worry about slow replies, I am usually horribly slow in
replying also.

Thank you VERY much for discovering and reporting this.

--Todd



Message has 1 Reply:
  Re: error message!
 
Hi Todd, again you impressed me with a way more detailed answer than I expected and again I'm not entirely sure that I understood everything. As long as I could help supporting it's fine though :) . (...) (eleven) (...) the (...) Oh, yes! There are (...) (24 years ago, 19-Nov-00, to lugnet.admin.general)

Message is in Reply To:
  Re: error message!
 
Thanks Todd, everything now works fine again, please excuse that I have stolen your time as we all know you have so much to do. I didn't entirely understand what excactly went wrong, but I'm happy it's okay now. I don't think that I entered an ASCII (...) (24 years ago, 19-Nov-00, to lugnet.admin.general)

15 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR