We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16278
    • 928 Posts
    Etelka kindly gave me a login to the site in question. The Ditto call, the template variable and the template looked fine (as you’d hope they would after all this effort), and I experimented a little with some new documents and my own version of the TV. The Ditto debug console showed the TV supplying the date in Unixtime format, yet it was not showing properly as a date, and what’s more, inserting the TV as a placeholder further down the template showed that it displayed as a timestamp when not set as &dateSource, but displayed nothing if it was the dateSource. After checking there was no corruption in the Ditto scripts, I eventually looked at the system info report, which indicated the site is running PHP4, and I concluded that this is why the date TV is not working when used as &dateSource for [+date+] - something to do with a change in array handling between PHP4 and 5, perhaps?
    Fortunately, it is possible to use the PHx date modifier instead, so the relevant part of the template now reads [+dateArticle:date=`%B %Y`+], and this is working fine laugh. In fact, it even makes more sense to me. Why have the Ditto call toss the date source and format up in the air for the template to catch like a trapeze act, if it can be done in one go and more explicitly in the template? Is it perhaps a case of "because we’ve always done it that way" huh
    KP
      • 25663 MODX Staff
      • 12,272 Posts
      Thanks for helping them out kp52 and great troubleshooting. smiley

      So what’s your backstory with respect to MODx?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 9133
        • 17 Posts
        Hello rthrash !

        For sure, kp52 has been wonderful ! As a beginner in MODx, I would never have found the trick with PHx date modifier.

        The method used by kp52 to explain the different steps, his patience and dedication can only be praised.

        I guess I will have to learn a lot more to use MODx more efficiently. It is surely not easy at the beginning, but I am certain that it is very powerful.

        Thanks to all that have tried to help on this "thread". I hope that the solution to my problem will help some other members of the MODx community.

        I feel well in this community !!!! smiley

        Etelka