Project:Event
Version:4.6.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

start time is 1970-01-01 on event page.
If I edit page, and preview start time is OK, but if I submit it start time is 1970-01-01 again.

AttachmentSize
Clipboard2.jpg5.3 KB

Comments

#1

are you actually creating the node initially with that date, or is it defaulting to that when you try to create a new event?

#2

No, the node date is OK.
Also, editing the page on preview date is correct, while submitting it is 1970 again.
see attached file and page http://www.prolocoveroli.it//index.php?q=node/17

it seems to be a problem only with updating pages, while a new page date is OK.

AttachmentSize
preview1.jpg 31.77 KB

#3

i haven't been able to reproduce this problem. try updating to the lastest 4.6 version of event.

#4

thank you for the quick response.
I can resolve the problem simply by inserting again the content (in this case the date is OK), because there are only a few records in database.
I thought to make you know about it, as it could be problem for others.

#5

Had this problem myself and updated to latest event.module CVS edition for use with Drupal 4.6.3 - everything works now. Woo-yay.

#6

I believe this is still an error. Yesterday I downloaded Drupal 4.6.3, set up some blog postings, and today I downloaded and installed both Flexinode and Event. New blog postings are fine, but old entries - even if they are updated now that the interface features the Event metadata - remain resolutely stuck on 1970-01-01!

Do get in touch with me via the contact form if you need further info.

Jon

#7

Priority:normal» minor

Usually, the time by default is the time of ether your browser (your computer) or the one of the server.

Confirm that both time are actual time.

#8

I can confirm the same problem here.

#9

I'm also having this problem.

#10

Status:active» needs review

The problem is in event_validate_form_date(), the $prefix variable doesn't include the _ to separate prefix from the date part. For example the form is setting start_day and end_year but the function is looking for startday and endyear.

The attached patch should correct the problem.

AttachmentSize
event.module_17.patch 2.38 KB

#11

Status:needs review» fixed

Comitted a simpler fix.

#12

"Comitted a simpler fix."

I'll just skip the patch then next time.

#13

Better don't. The fact that somebody bothered to create a patch got me to the point of looking at the problem. ;)

My patch of course is based on your patch.

#14

Status:fixed» active

First, pardon my childish tone in that last comment. It wasn't appropriate.

That said I think you over simplified, the fix you applied doesn't work. The problem is on line 1394, it ends up assigning the result to event__start or event__end instead of event_start or event_end. It also looks like there'll be problems on line 1399 because you'll be assigning the time to $node->start_ or $node->end_. I'd added the second variable to because sometimes $prefix is used as a prefix and other times it's used as a label.

#15

Status:active» needs review

I believe that most of the most recent confirmations of this bug are from cvs, not 4.6 as stated at the top of this page. Testing on Drupal cvs, I've confirmed the problem that all event nodes start and end on the 1st of january 1970.

The attached patch is one possible solution to this problem in the current cvs version of event.module.

AttachmentSize
event-dates.patch 1.35 KB

#16

Alan's patch looks like it should resolve the issue.

I don't think the whole

if ($prefix != '') {
  $prefix = $prefix .'_';
}

is needed though. I can't find a place where the function is called and $prefix isn't set. Just append the underscore:
$prefix .= '_';

#17

I might have made some mistakes, but I have tried to patch both the 4.6.0 version and the CVS version with both the patches suggested here and I could not manage to solve the problem. Actually with the Alan patch my event module does not seem to work anymore. Can you confirm that this patch works well for you and suggest to me what I might have done wrong?

Thanks in advance

#18

I had the same problem but deleting the first event makes everything else work just fine

#19

I have tried to delete the first event in the node type but nothing has changed. Of course if I create new nodes in that type no problem, but if I update the old ones I have the 1970 problem: my Drupal is very nostalgic, and it goes always back to the same date. I guess we should discover what has happened the first January 1970, and apply a freudian therapy to the problem.

#20

The prefixing bug has been fixed in cvs, please confirm this bug still exists there and if so open a new report. I am not closing this since its a 4.6 bug report and I have not checked to see if its resolved yet...

#21

http://drupal.org/node/38136 event_validate_form_date() is still broken in CVS

#22

I have the same problem, even after applying the patch event.module_17.patch. My date shows up as 1969-12-31 16:00

Thank you for any help.

#23

Status:needs review» closed (duplicate)

http://drupal.org/node/38136

nobody click here