I searched all of the threads that weren't archived, checking post_id=3 and found that as far back as thread 132 the month is missing. Let's see if this HTML works...
Thread ID
Missing Month?
132
Y
133
N
134
Y
135
N
136
Y
137
N
138
N
139
N
140
Y
141
N
142
N
143
Y
144
N
145
N
146
Y
147
N
148
Y
149
Y
150
Y
151
Y
Without seeing the code, it's hard to say what's going on; but, the available months in the select box seems to be dependent upon the months available within that particular thread. Perhaps there is something unique to these threads date-wise that's causing this error?
Ok, I think I found a correlation. Posts with missing months in the jump control have posts in October. I'm trying to find something I read a long while ago about a y2k-type issue in 2005... but maybe that's just my imagination. Anyway, here's some more data:
Thread ID
Missing Month?
First Post
Last Post
132
Y
2/16
10/3
133
N
2/22
5/23
134
Y
3/5
10/3
135
N
3/11
9/28
136
Y
3/14
10/3
137
N
5/23
4/28
138
N
3/29
5/18
139
N
4/28
6/7
140
Y
5/10
10/1
141
N
5/18
7/12
142
N
6/7
7/14
143
Y
6/23
10/3
144
N
7/12
9/1
145
N
7/14
8/21
146
Y
7/23
10/3
147
N
8/21
9/22
148
Y
8/25
10/3
149
Y
8/31
10/3
150
Y
9/1
All but one of the working threads on that list are closed, but I just posted in thread #135 (Buffy and Angel 1), and sure enough, that broke the month box.
Hey! Quit breaking stuff!
I had to go out, but I gave this some thought. As interesting as it would be to solve this problem, I think there's a more practical solution. I understand trying to limit the choices to possible values, but you're almost always going to end up with invalid choices, particularly with the month and day fields. My recommendation would be as follows:
Year: Continue with the way it is now. It's fairly inexpensive performance-wise to find the minimum and maximum dates in a thread and extract the year from those dates.
Month: List all months, Jan - Dec (you can keep the digits behind the scenes with the html 'value' tag if that's more convenient... humans tend to understand three digit months faster than translating a digit).
Day: List all days, 1 - 31.
The worst that will happen if the user selects an invalid date (i.e. a date not within the thread's time frame) is no posts are returned. You can clue the user into valid dates by printing the first post date nearby, if you want. Hmm... not sure what the behavior would be if a user selected Feb 31, 2005 (for example). I suppose you're going to need some date validation code before using the supplied date in a query.
This way, you save yourself a couple of queries per page view and it simplifies things which is usually a good thing.
The worst that will happen if the user selects an invalid date (i.e. a date not within the thread's time frame) is no posts are returned.
That's not what happens. Currently, if you enter a date for which there are no posts, it sends you to the next date for which there are posts. So if you pick a date before the thread was started, then it goes to the first post, e.g., if you enter the date 8/1/2005 in the boxes for Natter 38, it takes you to the first post in the thread, bon bon "Natter .38 Special" Aug 21, 2005 7:59:15 pm PDT.
If you enter 7/14/2003 in the Sang Sacre thread, you get shifted to the next date for which there are posts, Elena's Husband "Sang Sacré 1: It's a Blood, Blood, Blood, Blood World" Jul 18, 2003 8:30:55 pm PDT.
That part of the system works fine. What doesn't seem to work is the months box once posts are made in October of this year, and I don't see how what you're proposing would fix that..
It appears that there is code that inspects the thread and determines the months in use in that thread. This code limits the months available in the month box. In some threads, the available months are 6, 7, 8... others, it's the full 1 through 12.
Example, this thread only has months 2 and 3 because the thread began in February and ends in March Topic!Cindy "Natter 33 1/3" Feb 22, 2005 12:45:04 pm PST
I'm suggesting that we do away with this code and always present months 1-12 Jan-Dec and days 1-31 as options.