We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33431
    • 29 Posts
    Hello,

    Was wondering if anyone would know what my problem is with ditto displaying the year the as 1970 and all my post dates for news articles exactly the same date as 01.Jan.70 (1970 People)

    But when I look in the modx account manager I see the perfectly correct date and year for my posted articles (example Created:  03-12-2008 01:30:34 (admin) ) from View document data in the account manager of the site

    I have the TV set up as per ditto instructions with (widget) Unix Time selected in the myDate  TV. Why I get my date as year 1970 and the same date 01.Jan.70 for each and every single article I have posted I don’t know. Each time I wrap my head around one stumbling block in ditto I am faced with another heart breaking challenge

    My ditto call [!Ditto? &id=`1` &tpl=`rr` &parents=`2` &dateSource=`myDate` &sortBy=`myDate` &dateFormat=`%d.%b.%y` &trunc=`1` &extenders=`summary` &truncLen=`30` &paginateAlwaysShowLinks=`1` &summarize=`7` &paginate=`1`!]


    Thanks from Josh,

    Thanks people, I am off to sleep now in Australia. Will acknowledge the answers tommorow wink Cheers

      • 1122
      • 209 Posts
      There is no need to create custom date TV for displaying dates when your articles were posted. MODx database has "createdon" field where the date is automatically recorded; change in you ditto call
      &dateSource=`createdon` &sortBy=`createdon`
      

      You can also add &sortDir=`ASC` or &sortDir=`DESC` for desired sort direction.
        • 33431
        • 29 Posts
        Awesome, thanks Alik  smiley

        That fixed the posted dates up perfectly, I removed the call to the date TV

        Also I have ’reflect’ set up also, for some reason, reflect still shows the dates as february 1970. This is not that big an issue as I can change it to wayfinder instead for the news index. But wondering why ’reflect’ would be showing the date as 1970?

        Thanks

        regards Josh
          • 36592
          • 970 Posts
          What is your reflect call ?
            • 33431
            • 29 Posts
            Hello tkfm,

            My reflect call is

            [!Reflect? config=`wordpress` &targetID=`5` &getDocuments=`1` &dittoSnippetParameters=`parents:2`&id=`wp`!]

            Thankyou from Josh
              • 36592
              • 970 Posts
              Quote from: zeio at Dec 07, 2008, 11:27 PM

              [!Reflect? config=`wordpress` &targetID=`5` &getDocuments=`1` &dittoSnippetParameters=`parents:2`&id=`wp`!]
              First of all, you need to add ’&’ in front of ’config’ parameter like &config=`wordpress`.
              And the id of Reflect snippet call have to be the same as the one in Ditto call.
              So if you set &id=`wp` in your Reflect call, you should set the same in Ditto call on the document 5.
                • 33431
                • 29 Posts
                Thankyou very much tkfm worked great

                the reflect menu now shows the year as 2008 thanks

                I changed the call too this :
                [!Reflect? &config=`wordpress` &id=`wp` &targetID=`14` &getDocuments=`1` &dittoSnippetParameters=`parents:11`!]

                Thanks from Josh

                See you all tommorow, Goodnight