Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Dates showing as 1969! Please help!

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

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

Page: 1 2
Go to End
Author Topic: 3690 Views
  • spark
    Avatar
    Community Member
    15 Posts

    Dates showing as 1969! Please help! Link to this post

    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

  • spark
    Avatar
    Community Member
    15 Posts

    Re: Dates showing as 1969! Please help! Link to this post

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

  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Re: Dates showing as 1969! Please help! Link to this post

    What value is stored in the database ?

  • Garrett
    Avatar
    Community Member
    245 Posts

    Re: Dates showing as 1969! Please help! Link to this post

    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

  • spark
    Avatar
    Community Member
    15 Posts

    Re: Dates showing as 1969! Please help! Link to this post

    This is still unresolved.

    My database shows NULL and 00/00/0000.

    Danielle

  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Re: Dates showing as 1969! Please help! Link to this post

    Weird.

    Could you post the code ?

  • Phalkunz
    Avatar
    69 Posts

    Re: Dates showing as 1969! Please help! Link to this post

    Hi Spark,

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

  • spark
    Avatar
    Community Member
    15 Posts

    Re: Dates showing as 1969! Please help! Link to this post

    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

    3690 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.