Publishedon suddenly not rendered/visible anymore

I have this in my chunk:
[[+publishedon:strtotime:date=%e %B %Y]]

Suddenly the published on date is not visible anymore. Why?

In your chunk you use it like this, right? (backticks)
[[+publishedon:strtotime:date=`%e %B %Y`]]

What is %e supposed to output?
Try: [[+publishedon:strtotime:date=`%d %B %Y`]]

1 Like

It looks like %e is the day. But I would normally use your code. This link suggests that there could be a problem with %e on Windows servers.

That’s not the problem. It has worked for years.

If something suddenly stops working I usually check to see if something has been changed somewhere.

If this is on shared hosting could the hosting company have upgraded something without notifying you?

It might help others to offer assistance if you can provide the version numbers of all components in your environment. ie: MODX, PHP, MySQL or Maria. Also maybe the encoding of the DB.

My hosting provider does not change anything suddenly. Everthing is up to date. Besides that, I’m not a develope, I don’t even know what you mean by ‘encoding of the DB’. Everything is updated regularly, monitored (SiteDash), etc.

Although you are not a developer you can make life simpler for any developers who wish to assist you by obtaining some information.

Here are some instructions describing how to get hold of some of the crucial stuff…

Go to the MODX menu: Manage / Reports / System Info

Copy the following information from the list

MODX version:
* phpinfo(): View

Database type:
Database version:
Database charset:

* The phpinfo entry has a link called view that takes you to another page where you can copy the PHP version.

PHP Version:

Don’t copy an post all the information in the pages that come up as there may be security implications in doing so.

Posting this sort of stuff can also help others in the future. If someone with the same problem finds this post in 2023 it will help them to know what version of software are being used.

1 Like
[2021-03-19 16:44:46] (ERROR @ /var/www/vhosts/ : 541) Could not find snippet with name Gallery.
[2021-03-19 16:44:46] (ERROR @ /var/www/vhosts/ : 541) Could not find snippet with name Gallery.
[2021-03-19 16:44:46] (ERROR @ /var/www/vhosts/ : 541) Could not find snippet with name Gallery.

Thanks for helping a non-developer how to make your life simpler.

Like I said: everything is up-to-date. PHP version is 7.4.15. Charset is a regular UTF-8. Databasetype
mysql. Database versie: 10.1.48-MariaDB-1~xenial

1 Like

Your opening topic is open to interpretation, but is it right to interpret it that the publishedon date doesn’t show at all (not any output), but other values in the chunk do render as expected?

What does just [[+publishedon]] output, without the filters? And what is the chunk called by, getResources or pdoResources (or something else)?

Also I wouldn’t have to work another day in my life if I got €1 every time someone said “everything’s up to date” and it turns out that isn’t the case later. :wink: Stating specific versions when asked to provide those help rule that out.

1 Like

I found it! The Gallery extra was deactivated. On activating the publishedon dates are visible again?!?
I don’t know why that extra became deactivated by itself. I didn’t notice it at first.

And I really don’t understand what the Gallery extra has to do with not showing the publishedon date of resources (news items).

1 Like

I’m using your SiteDash software to keep ‘everything up-to-date’ :slight_smile: .

The snippet is called by getResources. It didn’t output anything, with or without filters.