When submitting a comment (as the administrator in my test case), I get an error saying "You have to specify a valid date."
My initial strategy of waiting for a fix to show up in CVS hasn't worked so far, so I created this patch. However on the walk to the internet, I had some second thoughts about this patch.
This patch at least allows me to create comments, but I have the feeling it makes the check on the next line useless.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | you-have-to-specify-a-valid-date_0.patch | 932 bytes | Wesley Tanaka |
| you-have-to-specify-a-valid-date.patch | 540 bytes | Wesley Tanaka |
Comments
Comment #1
Wesley Tanaka commentedThis patch is probably more likely to fix the problem without causing problems with editing the date later on. But it's difficult for me to test it here.
Comment #2
Wesley Tanaka commentedComment #3
Wesley Tanaka commentedI've smoke tested http://drupal.org/files/issues/you-have-to-specify-a-valid-date_0.patch by:
1. posting a comment as the administrator
2. editing that comment and changing the date
3. re-editing the comment and trying to change the date to "abcdefg" (which failed properly)
Comment #4
Wesley Tanaka commentedRevising the title. In most issue tracking processes, this would be considered a "blocker."
Comment #5
Wesley Tanaka commentedRevising the title. In most issue tracking processes, this would be considered a "blocker."
Comment #6
Wesley Tanaka commentedplagiarizing from Cvbge:
Let's set this to RTBC and see what happens ;)
Comment #7
Cvbge commentedI think I can't reproduce this...
Comment #8
Wesley Tanaka commentedThat's strange, since by inspection, if the validate function gets called, that form error will get set 100% of the time.
Comment #9
Wesley Tanaka commentedIn any case, the steps I used to reproduce the problem:
1. log in as the superuser
2. navigate to an existing forum topic
3. use the comment form that's displayed on the same page to write a comment
4. hit submit
The comment fails with the error "You have to specify a valid date"
Comment #10
chx commentedLooks good to me but I have not run the code as i am on PHP4.
Comment #11
dries commentedIsn't
if (strtotime($date) <= 0)better? It is what we use elsewhere:Comment #12
morbus iffThis bug also causes *comment creation*, be it anony or admin, to fail. Will test the patch shortly in PHP 5.
Comment #13
morbus iffPatch works for me on PHP 5.0.3.
Comment #14
dries commentedCommitted a modified version of this patch. Thanks guys.
Comment #15
(not verified) commented