Hello,
I’ve discovered that the $modx->error->failure() function doesn’t work when I load modx externally. Here is my code:
<?php
// Load the config.core.php and the load the configuration and MODx itself
require_once './config.core.php';
require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php';
require_once MODX_CORE_PATH.'model/modx/modx.class.php';
// Initialize MODx in the web contect
$modx = new modX();
$modx->initialize('web');
die($modx->toJSON($modx->error->failure('Error!')));
produces
Fatal error: Call to a member function failure() on a non-object in /Users/Josef/Documents/Entwicklung/MAMP/GalleryGear/test.php on line 11
It works though when I call it in a custom manager page. I use Revo 2.0.8-pl (traditional). If you want to reproduce what I did simply put the php script above into a file and store it in the main directory.
thanks for help
PS: The new site design is just awsome