Publishedon not working in chunk?

It seems that using [[+publishedon:strtotime:date=%Y-%m-%d]] in a chunk isn’t working. [[+publishedon]] works however.

I call it from a template using &tpl in pdoPage if that makes any difference.

Any solutions?

Using MODX 3.0.4-dev and PHP 8.

Try using [[+publishedon:date=`%Y-%m-%d`]] instead.
The field “publishedon” isn’t stored as a string, so the output modifier “strtotime” doesn’t work.

That did the trick! Strangely enough strtotime works when used in a template, but not in a chunk.

Many thanks @halftrainedharry!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.