Closed (fixed)
Project:
Birthdays
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2007 at 10:00 UTC
Updated:
27 Aug 2007 at 07:17 UTC
After a while BDs automatically sets to January 1, 1900. I have set my birthday yesterday, today it is again January 1, 1900.
Comments
Comment #1
sinfield commentedI am experiencing what may be a variation on this problem. Rather than after some time has passed, my birthdays reset for any user when he or she creates content.
Drupal 5.1
PHP 5.1.6
mySQL 5.0.27
Comment #2
spyderpie commentedI am having the same trouble too!
Comment #3
yngens commentedsinfield, actually i have exactly the same problem as you do. i just could not figure out why and when exactly DB was changing. after reading your post i tried to set up BD and post new blog and, viola, BD changed back to January 1, 1900.
Comment #4
yngens commentedI recall this issue had been solved for 4.7, but now can not find the thread. Probably it was deleted. I wonder what BD module has with submitting new nodes?
Comment #5
hbrock commentedHey there,
I'am having the same Problem on Drupal 5.1 PHP5.
I tried a little hack :
File : birthdays.module
function birthdays_user
changed from:
$year = $edit['DOB']['year'];
$month = $edit['DOB']['month'];
$day = $edit['DOB']['day'];
to:
$year = $edit['DOB']['year'];
$month = $edit['DOB']['month'];
$day = $edit['DOB']['day'];
if($year == null & $month == null & $day == null)
{
$year = $user->DOB['year'];
$month = $user->DOB['month'];
$day = $user->DOB['day'];
}
Maybe you can change the hole $edit stuff to $user but i didn't want to damage the original code.
Hope that helps ..
H-Brock
Comment #6
hbrock commentedDidn't do the trick for all users i will post my research results. But for now my Page is not resetting the Database DBO is still correct but the Date is not displayed the right way.
Comment #7
yngens commentedbkz of this error i had to switch the module off. will be waiting for the solution.
Comment #8
GTAce commentedI was just curious as to whether or not somebody has come up with a solution for this yet?
Comment #9
Dahaniel commentedI got the same problem.
Comment #10
mukeshtalks commentedHello i am also facin same problem.
Comment #11
jacauc commentedSame here: http://www.dieinter.net/birthdays
subscribing
Comment #12
drazzig commentedI've tried to recreate this bug, and I managed to once, but not since. I've tried to add new content for different users to reset the birthday (using latest code release for Drupal v5) and also to run a cron job to see why people are reporting the birthday is resetting itself daily.
There is only one place where user's birthdays are updated in the database and thats on line 271:
There are no other places in the code where a DB insert or update are sent that could reset the data.
What I did to monitor this is place the watchdog statements below after each db_query to put in the log an entry everytime they are used. This will help to see if the code is getting to this point when content is created or cron jobs are being run:
If you can add this to your modules and report the results this may bring us a little closer to finding what the problem is. Please report as much of the steps that led to the reset as possible so I can try and recreate locally and hopefully provide a fix!
Drazzig
Comment #13
drazzig commentedActually a more useful watchdog statement would be:
So we can actually see whats being sent to the database. Thanks.
Comment #14
csc4 commentedI noticed you're using the variable $dob a number of times and in different ways.
Line 267
Line 314
Line 322
Line 383
Is it worth giving them distinct names for each sort of use to eliminate any possible conflicts from the puzzle? I think renaming the line 383 case would be a good idea.
Comment #15
maartenvg commentedThis seems to be fixed in the new development version. I happily can create and remove items without resetting birthday information.
Please confirm.
Comment #16
(not verified) commented