Hi there,
I’ve implemented Ditto to summarize the News articles on my homepage - but it is setting a date for all articles to 31-12-1969, which I found is basically the UNIX epoch for Julian dates. Which makes me think that it is reading in a big fat "0" for the creation date.
Should mention that the news article documents all have geniune creation dates, it just seems that Ditto is not picking it up.
Does anyone know a way I can check this, and hopefully fix this issue (see debug output below)?
Thanks in advance,
Number supposed to be summarized (summarize): 3
Total supposed to be returned: 3
Count of total in db: 4
Sort by (sortBy): pub_date
Sort direction (sortDir): DESC
Using the new MODx 0.9.2.1 API
TVs:
Start at 0 and stop at 3 out of 4
Document Data for "testj jk "
[+id+] => 73
[+type+] => document
[+contentType+] => text/html
[+pagetitle+] => testj jk
[+longtitle+] => long test khbkh
[+description+] => des
[+alias+] => article-1176670238
[+link_attributes+] =>
[+published+] => 1
[+pub_date+] => 0
[+unpub_date+] => 0
[+parent+] => 66
[+isfolder+] => 0
[+introtext+] => summary test
[+richtext+] => 1
[+template+] => 1
[+menuindex+] => 3
[+searchable+] => 1
[+cacheable+] => 1
[+createdby+] => 0
[+createdon+] => 1176669669
[+editedby+] => 0
[+editedon+] => 1176670238
[+deleted+] => 0
[+deletedon+] => 0
[+deletedby+] => 0
[+publishedon+] => 0
[+publishedby+] => 0
[+menutitle+] =>
[+donthit+] => 0
[+haskeywords+] => 0
[+hasmetatags+] => 0
[+privateweb+] => 0
[+privatemgr+] => 0
[+content_dispo+] => 0
[+hidemenu+] => 1
[+title+] => testj jk
[+summary+] => summary test
[+link+] => <a href="index.php?id=73">Read more...</a>
[+author+] =>
[+date+] => 31-Dec-69 16:00
tpl = FirstRow -> <div class="ditto_summaryPost"> <h3><a href="[~[+id+]~]">[+title+]</a></h3> <div>[+summary+]</div> <p>[+link+]</p> <div style="text-align:right;">by <strong>[+author+]</strong> on [+date+]</div> </div>
Roger
It looks like you are passing an invalid date source or format parameter. Please post your Ditto call so I can take a look.
Also, I’d highly recommend updaing to Ditto 2 and using the new debug console.
Here is the Ditto call
[[Ditto? &startID=`66` &summarize=`3` &debug=`0` &mode=`development` &sortBy=`pub_date` &tpl=`nl_sidebar`]]
I tried it with and without the sortBy option.
I will take a look at Ditto 2.
THanks
Many thanks, updating to version 2.02 was enough - it now formats correctly.
I have another question - how do I get such a nice editor as this one working with the News Manager? Is the tinyMCE rich text editor compatible with NewsManager? When I tried it I got an error on submitting the news article of "missing content" even though the content was entered into the editor?
Cheers