New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date of birth handling is wrong #428
Comments
This problem is related to the Extbase DateTimeConverter in TYPO3, which is responsible for the conversion of the date string. From a technical point of view, the DateTimeConverter converts a datestring as following Sadly, the DateTimeConverter for the dateOfBirth field is always called before the Extbase datefield validation. Therefore, Extbase will always receive a valid date field, if the DateTimeConverter can convert the datestring. As far as I found out, there is no "good" possibility to validate the entered date format, before the DateTimeConverter converts the field input. The only possibility is to extend the DateTimeConverter, which will result in a TYPO3 systemwide extension of the DateTimeConverter. This may lead to other unexpected behaviour in TYPO3 :-( I was about to write a blog article about this topic, but due to missing time, this is on hold. Therefore I suggest to use client side date validation and/or a JS datepicker for the dateOfBirth field. I'll keep this issue open, so I can have a deeper look into the issue. |
There is another issue with the date currently.
|
Fixes problems with MySQL running in Strict mode Refs #428
Closing the issue for now. |
Extension version
1.8.1
Short problem description
Date of birth validation is insufficient and/or date is stored in the wrong format.
Steps to reproduce
Expected behavior
The validation should either determine this to be invalid, as the given year only consists of two ciphers, or it should be interpreted as "01.01.1990". The date of birth should then be consistent in all notification mails.
Actual behavior
In the new registration mail, the date is shown as "01.01.0090".
In the confrm registration mail, the date is shown as "13.12.1901".
The extension interprets the input as "01.01.90" - as in January 1st year 90. In the database the date of birth is stored as a Unix timestamp in an integer column. The given date however goes out of bounds regarding the integer range, thus resulting in the lowest possible value, which is -2147483648 (= 13.12.1901).
This is basically a combination of a technical issue and a usability issue:
Server configuration
TYPO3 version:
6.2.x
PHP version:
5.6.8
The text was updated successfully, but these errors were encountered: