500 Internal Server Error after restoring site from backup

Summary

I screwed up my core/config.inc.php setup while updating to MODX323 and wrote into the wrong database.

I restored the site data and database from backup.

The Manager page works well, however the public site returns a “500 Internal Server Error”

mics-munich.de 0 88.130.218.70 - - [24/Jul/2026:17:35:33 +0200] “GET /fr/ HTTP/2.0” 500 134 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:152.0) Gecko/20100101 Firefox/152.0”

Manager error code: [2026-07-24 17:44:03] (ERROR @ /usr/www/users/micsvm/mics304/core/cache/includes/elements/modx/revolution/modplugin/3.include.cache.php : 4) PHP warning: Undefined array key “cultureKey”

Environment

MODX 304
PHP Version 8.4.23

Where else can I look to pinpoint the problem?

Check what plugin has ID 3 - if it’s SiteDash Client, upgrade that to v1.9.2. If it’s something else let us know.

Unlikely that’s what causes the 500 error though. Can you access the PHP error log on your server?

Alternatively, as a temporary hack, I find adding this to the top of the index.php can be useful to diagnose these sorts of issues quickly as it will dump the error message to the screen:

<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);

Make sure to remove it afterwards.

ID 3 is a small snippet that loads some lexicon values

<?php $modx->getService('lexicon', 'modLexicon'); $modx->lexicon->load('mics:default');

Only working in manager does not trigger error messages, and the site cannot be executed sue to the 500 error.

I have enabled php error log on the server, but no activity no error - same as above.

I hacked your little snippet into the index.php of the site root directory.
On which screen do the results show up?

With that code, the errors should appear directly in the front-end when it gets the 500 error.

Front-end 500 errors are often caused by a problem with your .htaccess file or a bad path or URL in your config.inc.php file.

Another possible issue is having a cached base href tag in a template. It should look like this (with the exclamation point) in the head section of all templates:

[[!++site_url]]

I learned how to enable PHP error logging in the WEB frontend of my service provider. This revealed the (stupid) typo error.

MarkH - your little hack to the index.php contained an extra quote behind the “1” - This is because I didn’t se the error message. It should be:
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);

Thanks for your help and support!

Oops, my bad! Fixed the post :laughing: