Форуми / Cotonti / Support / 0.0.6: Users age being set to nine?

12>>>

Triton
#1 17.07.2009 14:53
This is also happening here (Looks at Age: 9 on left side =<).

When new users register (or when current users do not have a birthdate set) their brithdate is set to November 30, 1999 and they cannot edit the date in their profile. I first noticed it on my site and it is happening here as well, every new user that was registering had their birthdate set to November 30, 1999 and the members that did not have their birthdate set was set the same, only the people who had a birthdate set remained unaffected. I had to go into phpmyadmin in order to change the birthdate

Is it a bugz or did I forget something while updating? :x

Thanks in advance ^^
Dave
#2 17.07.2009 15:12
erm ... im not pro here :p but does ur user.edit.tpl (skin file) have tag to edit it? it might be in case of custom skin
Your advertisement here :-)

Cotonti Genoa based site: forgotten-garage.pl
Triton
#3 17.07.2009 15:14
# Dave : erm ... im not pro here :p but does ur user.edit.tpl (skin file) have tag to edit it? it might be in case of custom skin

Yup, I am able to make changes to my profile, but they do not save. It also happens here unfortunately =/

Edit: After changing the value in the DB I am able to edit my profile like normal, but if I create a test account, the test account is unable to edit the profile
tensh
#4 17.07.2009 16:23
There was a script updating birthdates. You probably forgot to launch it... See Trac and list of changes for Genoa, it should be somewhere there.
Triton
#5 17.07.2009 17:40
Hello, if you mean patch.php, yes I did run it when I updated Cotonti. The same thing that is happening to one of my sites is also happening on this forum (If you look at my profile it says my Age is 9, and I cannot edit anything in my profile)

Here is exactly what I did:
1.) Refreshed files on a local testing webserver
2.) Ran Cotonti 0.0.5 -> Cotonti 0.0.6 SQl file in phpmyadmin
3.) Fixed minor skin problems
4.) Noticed Ages were messed up, so I ran patch.php. This fixed the ages, provided the birthdate was actually set. If a user actually set their birthdate before the upgrade then the age will display correctly. However if they did not set a birthdate before the upgrade, there age will appear as 9 and they will be unable to edit their profile.

The same thing is happening here, I never set my birthdate on this forum but it is showing up as 'Age: 9' and I cannot edit it. (If I go into Profile and set my birthdate from 1999, 11, 20 to a different number and select save, the changes do not save.) I was playing around with it on my test server and after I manually edited the birthdate table (phpmyadmin -> cms -> sed_users) I was able to update my profile again as if nothing happened.

Thanks for the replies so far <3 ^^
DemptD
#6 17.07.2009 19:08
this happens to me also. All birthdates are set to 1999, november, 9.

Cannot change it.

I had 0.0.5 before i updated, do i have to run patch.php then?
tensh
#7 17.07.2009 19:16
That way you describe it, it seems it's some kind of bug.

However, I corrected my brithdate on this site and it's ok... but I don't remember if it was before or after update :)

A patch file looking for that specific birthdate (or maybe: empty birthdates) and converting it would be needed.
But lets' wait what Cotonti developers have to say.

Відредаговано: tensh (17.07.2009 19:21, 14 років тому)
Trustmaster
#8 17.07.2009 20:49
Seems like a bug, though I couldn't reproduce it. I registered a new account here and yes its birthday was set to 1999 November 30 but then I had no problems setting it whatever I wish (e.g. 1958 Feb 13) and the age was displayed right. Neither I had to change my birthdate when this site was updated to 0.0.6.

Could you please check what phpMyAdmin says about user_birthdate column of sed_users table? It should be DATE type.

That patch.php is required if you're updating to 0.0.6 from any previous version, including 0.0.5. But you need to only run it once.
May the Source be with you!
DemptD
#9 17.07.2009 21:23
Type is INIT

if i try to change to DATE i get:

SQL-spørring:
ALTER TABLE `sed_users` CHANGE `user_birthdate` `user_birthdate` DATE NOT NULL DEFAULT '0'

MySQL sa: Dokumentasjon
#1067 - Invalid default value for 'user_birthdate' 

Where do i find patch.php?
Trustmaster
#10 17.07.2009 21:54
0.0.6 download page, updating from 0.0.5:
Copy sql/patch-0.0.6.txt, save it in your site root as patch.php, run in web browser like http://your-domain.tld/patch.php and then remove patch.php from your site.

There is no other way to change that column type and have existing data saved but running a PHP patch.
May the Source be with you!
DemptD
#11 17.07.2009 22:43
thank you, that fixed it
Triton
#12 19.07.2009 07:53
Hello, I should've tried playing around with a bit more before making this topic, xD. Well, basically your age does set and update correctly if you set your birthdate to an actual date, however what I was trying to do on my test server was setting my birthdate to "----" "--" "--". So after you set your birthdate to "----" "--" "--" your birthdate automatically changes to 1999, November 30

Thank you for the replies ^^
Trustmaster
#13 19.07.2009 19:45
I'll check what happens when you try to blank your birthdate.
May the Source be with you!
minoation
#14 20.07.2009 00:42
Do this if you have done the sql business and the file business.Okay another easy way to do it is just upload the patch-0.0.6.txt file from the sql folder to the public_html folder.
Then rename it to patch.php.
Then, go to http://www.yoursite.com/patch.php.
There will be a whte page saying:Conversion Complted.
Then you may delete the patch.php file.
Your age will be blank and you may set it from there.
Simple?
Awesome!
KillerSneak
#15 23.07.2009 18:43
Same problem on my site, followed instructions to the point.

12>>>