You’re getting a 500 internal server error, so you need to look at your server error log for details.
Perhaps $this->modx
isn’t a modX instance but an xPDO instance? That could explain why getObject works but not makeUrl. Perhaps the problem is that you need to first initialize/load a context before makeUrl can get to the context cache? The error in the server/php error log will hopefully provide answers, so we don’t have to guess.
This suggests you’re trying to load a package modResource, which indeed doesn’t exist. That might be coming from your index.php where you call $modx->addPackage()
? The package for modResource is modx
, and already automatically loaded when MODX is initialised. Could be useful if you also post your index file.