OK, weird, I just removed the &dateSource attribute for the Ditto call and it worked. Odd.
OK, this just happened on another site. using "pub_date" to sort and display works fine, but as soon as I use a custom date TV I get the above error. I need to use a custom date because the event is happening in the future and I need to display it correctly on the list page. If I use pub_date, it won’t display at all until the designated date. I’m using the latest version of Ditto 2.1
How is your custom date TV defined? I reproduced your error with a date TV of my own by setting it to use the Date Formatter widget. It has to use the Unixtime widget to supply Ditto with a Unix timestamp, the long integer that strftime() is expecting to receive.
::) KP
I’m using "Date" as the input and "unixtime" as the widget. Can you recreate the error using unixtime?
What version of MODx are you using? I’m at 9.6.1 - Could that be it?
I have exactly the same problem:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: strftime() expects parameter 2 to be long, array given
Error type/ Nr.: Warning - 2
File: /xxxx/xxxxxxxxx/public_html/xxxx/assets/snippets/ditto/classes/ditto.class.inc.php
Line: 294
Line 294 source: $placeholders[’date’] = strftime($dateFormat,$timestamp);
The one thing I can add is that this problem only occurs when I use "Server Offset time". Everything was fine until I changed the value from 0 to 7. Does anyone have a fix for this?
I really have to use my own date template variable so the solution above doesn’t work for me. I’m using Ditto and the Unixtime widget just as described in the article.
Who’d have thunk dealing with time would be so hard.