Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Dates showing as 1969! Please help!


Go to End


10 Posts   5363 Views

Avatar
spark

Community Member, 15 Posts

7 September 2008 at 6:11am

HEY THERE!

I used SilverStripe to build a site for a client... www.parkhillscc.com

The Events pages are showing the dates as 12/31/1969 - this is quite odd to me. Can some one please assist me here? I have an irritated client and I have tried the steps in a few other posts here about this problem w/ no success. Any help is greatly appreciated.

Danielle

Avatar
spark

Community Member, 15 Posts

11 September 2008 at 2:38am

Any one available to assist? I could really use some help! Thanks in advance.

Avatar
Fuzz10

Community Member, 791 Posts

11 September 2008 at 7:36pm

What value is stored in the database ?

Avatar
Garrett

Community Member, 245 Posts

12 September 2008 at 3:36am

Hi--

Did you ever get this solved? I'm having the same issue in the Blog module. No matter what date my blog posts have in the DB, the Archive links say "December 1969".

Any ideas??

//Garrett

Avatar
spark

Community Member, 15 Posts

12 September 2008 at 5:56am

This is still unresolved.

My database shows NULL and 00/00/0000.

Danielle

Avatar
Fuzz10

Community Member, 791 Posts

12 September 2008 at 6:26am

Weird.

Could you post the code ?

Avatar
Phalkunz

Community Member, 69 Posts

12 September 2008 at 12:03pm

Hi Spark,

Most likely, you date field points to wrong database field.

Avatar
spark

Community Member, 15 Posts

9 October 2008 at 2:08pm

Here is my ArticlePage.php code:

<?php
/**
 * Defines the ArticlePage page type
 */
class ArticlePage extends Page {
   static $db = array(
   'Date' => 'Date',
   'Author' => 'Text'
);
   static $has_one = array(
   );
   
   function getCMSFields() {
   $fields = parent::getCMSFields();
 
   $fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date', 'Date'), 'Content'); 
   $fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
    	
   return $fields;

   }
}
 
class ArticlePage_Controller extends Page_Controller {
 
}
 
?>

But when anything is posted, it changes the date to 00/00/0000 both in the CMS and in the database. This is a major problem. Can anyone please help??

Danielle

Go to Top