I have a blog which i created using collections/tagger/archivist.
It has been up and running for many years, and not a problem, but today a user mentioned that the archives section isn’t working, and throws 500 errors whenever they click on a year.
I haven[t’ changed anything, so all i can think is that an update somewhere down the line killed it.
This is what I have to create the links to the years:
UPDATE: I just worked out that it’s the PHP version which is causing the problem!
I recently updated the site to run on PHP7.2.
I just changed it back to PHP7.0 =, and the archives work.
Thanks - just checked and it says this: [2019-10-16 14:51:25] (ERROR @ /home/site/public_html/core/cache/includes/elements/modsnippet/67.include.cache.php : 142) PHP warning: count(): Parameter must be an array or an object that implements Countable
Hmm - strangely there is no error in the logs with that added code - but I still get a 500 error for the archive pages e.g.: https://www.site.co.uk/archives/2019
That’s all a bit beyond my knowledge base I’m afraid.
Fingers crossed the developer comes back with an upgrade/fix because I’ve had to upgrade php to 7.2 due to other extras making it a minimum requirement.
Hi all. I have another site which runs a blog using Articles.
This still uses archivist to create the archive pages - but that works fine, and it’s on php 7.2. and MODX 2.7.2. So I suppose a work around is to recreate the blog using Articles, instead of getResources/Collections. I just cannot work out why it would be different, as they both use the same Extra (Archives).
The .htaccess file is the most common cause of 500 errors. There’s one in the root and sometimes one in the Manager folder. Have you changed either one lately?
Do you have the latest version of MODX?
It sounds like you’ve eliminated most of the possible causes on your end, at that point, it’s most likely something your host did, like a PHP upgrade, change in the file structure, new php.ini, or new mod_security rules. It’s also possible that the database is overloaded and is timing out or rejecting calls from the Manager.