We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18809
    • 109 Posts
    Hello,
    I have problem with createdon snippet. Its not showing date when I call it anywhere.
    Publishedon showing date correctly.
    And I just upgraded to Modx 2.5.1 for 2.5.0 and in warning essages, its showing this -
    Error updating table for class modUser
    Array
    (
    [0] => 42S21
    [1] => 1060
    [2] => Duplicate column name 'createdon'
    )


    Modx manager and front end site working properly after upgrade. But I want to clean out this createdon thing. I think some table problem in database. I don't want to check it out before the suggestion/ help from here.
    Help please.

    This question has been answered by BobRay. See the first response.

      My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
      • 3749
      • 24,544 Posts
      Can you post the code of the createdon snippet? It's not in the extras repository.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 18809
        • 109 Posts
        Quote from: BobRay at Jul 24, 2016, 05:30 AM
        Can you post the code of the createdon snippet? It's not in the extras repository.


        I am really sorry that i write snippet there. Its default tv tag for date time. Again sorry if im calling it wrong. I'm still learning.

        [[*createdon:strtotime:date=`%a %b %e, %Y`]] 


        And I have Blogit extra which contains Collection Extra and I removed Articles extra completely.
        I also installed and removed Flatso Blog Theme Extra which also contains Collections Extra. I think this messed some tables.
        [ed. note: Mayanktaker last edited this post 7 years, 8 months ago.]
          My Proudly Powerd By Modx site - http://irresistiblemt.in smiley Its simple site but its made in best CMS.
        • discuss.answer
          • 3749
          • 24,544 Posts
          It looks like you're using the format tokens for strftime, not date.

          Try this:

          [[*createdon:strtotime:strftime=`%a %b %e, %Y`]]


          Note that %e is not supported on Windows.

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting