Skip to content
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

Different birth date values in the profile and database #6285

Closed
rich20 opened this issue Apr 23, 2019 · 7 comments

Comments

@rich20
Copy link
Member

commented Apr 23, 2019

Describe the bug
https://www.kunena.org/forum/k5-1-support/158175-bug-can-t-modify-user-in-version-5-1-12-1
Confirmed

To Reproduce

  1. Edit an user profile, empty the birthday field and save
  2. After save you have this date 11/30/-0001 in this field
  3. Check the database, it shows the date of birth 0000-00-00
  4. Now try edit and save something in the profile

Actual result
You get this error:
DateTime::__construct(): Failed to parse time string (11/30/-0001) at position 5 (/): Unexpected character

System information (please complete the following information)
Joomla version: 3.9.5
Kunena version: 5.1.12.1 and 5.1.13-dev
Php version: 7.3.3
Database version: 5.5.58 Collation utf8mb4_general_ci

@rich20 rich20 added bug 5.1 labels Apr 23, 2019

@rich20 rich20 added this to the 5.1.13 milestone Apr 23, 2019

@rich20 rich20 changed the title Different birth date values between in the profile and database Different birth date values in the profile and database Apr 23, 2019

@sshcli

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

The bug is related to this one: #6115

@rich20

This comment has been minimized.

Copy link
Member Author

commented Apr 23, 2019

Yes, you're right, but the other bug report is already closed although the error still exists.

@sshcli

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

@rich20 sorry if there was a misunderstood, the intention of my comment is to help quickly identify error background and all related commits to fix the problem, is not for close this issue. I agree with this new issue.

@rich20

This comment has been minimized.

Copy link
Member Author

commented Apr 23, 2019

No problem @sshcli
The problem seems the script of the calendar. It's not possible in the frontend manually to enter this date of birth 01/01/0001. Try it, the date will cutted to 01/01/1 and after save it is changed to 01/01/2001

@sshcli

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

When using the default settings for the bootstrap datetimepicker, the field is disabled and insert data is only posible by using the picker.

Maybe a definitive solution to this problem, could be remove all custom modifications and use the datepicker with default settings and values, with no extra code.

@rich20

This comment has been minimized.

Copy link
Member Author

commented Apr 23, 2019

This solution would only work if you can choose the year on the datetimepicker. When the default value is 01/01/0001 you need currently 1999 x 12 clicks if your birth date is in the year 01/01/2000. You can go for- or backwards only per month.
Sorry, was nonsense what I've written.

@xillibit

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

MySql since 5.7 has changed the supported range for datetime value, so i think it's the main reason why we have this kind of issue in Kunena : https://dev.mysql.com/doc/refman/5.7/en/datetime.html

810 added a commit that referenced this issue Jul 19, 2019

@810 810 closed this Jul 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.