I have this in my chunk:
[[+publishedon:strtotime:date=
%e %B %Y]]
Suddenly the published on date is not visible anymore. Why?
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`]]
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.
[2021-03-19 16:44:46] (ERROR @ /var/www/vhosts/website.nl/httpdocs/core/model/modx/modparser.class.php : 541) Could not find snippet with name Gallery.
[2021-03-19 16:44:46] (ERROR @ /var/www/vhosts/website.nl/httpdocs/core/model/modx/modparser.class.php : 541) Could not find snippet with name Gallery.
[2021-03-19 16:44:46] (ERROR @ /var/www/vhosts/website.nl/httpdocs/core/model/modx/modparser.class.php : 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
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. Stating specific versions when asked to provide those help rule that out.
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).
Iâm using your SiteDash software to keep âeverything up-to-dateâ .
The snippet is called by getResources. It didnât output anything, with or without filters.