Blog Sections Open

Fixing Ditto Date Output That Falls Back to `-1` in Evolution CMS

How to fix Ditto when date placeholders fall back to `-1` instead of a usable publication date.

When Ditto prints -1 instead of a real date, the problem is usually not formatting. It is usually the wrong source field. Evolution CMS stores several timestamps, and Ditto will only format the one you tell it to use.

In the reported case, the fix was to point Ditto at pub_date explicitly with &dateSource=`pub_date`. Once the correct source field is used, placeholders such as [+pub_date+] and formatted date output stop collapsing into invalid values.

This matters most on migrated sites and bulk-imported content, where createdon, publishedon, and pub_date may all mean slightly different things. If the listing is meant to represent editorial publication chronology, the wrong field can quietly produce nonsense.

The lesson is simple: treat date output as data modeling, not only as formatting. Choose the real editorial date field first, then format it.

Newer post

Choosing Between Real Cron and AJAX Cron in Evolution CMS

How to decide whether a scheduled task should run through system cron or an AJAX-triggered pseudo-cron approach in Evolution CMS.

Older post

Avoiding Duplicate `page/1` Pagination URLs in Evolution CMS

Why `page/1` should not coexist with the base listing URL and how to keep paginated archives canonical in Evolution CMS.