Hello,
After many hours of hairs tearing and forums reading leading to nothing, i might have find a bug with modx connector which cause ajax call to fail when sended from IE8 (with jQuery, didn't test with others libs);
Using the default connector as in the docs:
<?php
require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config.core.php';
require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php';
require_once MODX_CONNECTORS_PATH.'index.php';
require_once MODX_CORE_PATH.'components/mycomponent/model/mycomponent/mycomponent.class.php';
$modx->mycomponent = new MyComponent($modx);
if (isset($_REQUEST['resource'])) {
$modx->resource = $modx->getObject('modResource',$_REQUEST['resource']);
}
/* handle request */
$path = $modx->getOption('processors_path',$modx->mycomponent->config,$modx->getOption('core_path').'components/mycomponent/processors/');
$modx->request->handleRequest(array(
'processors_path' => $path,
'location' => '',
));
I noticed that nothing happenned after this line (only with IE):
<?php
require_once MODX_CONNECTORS_PATH.'index.php';
The script literally die with the file located in "connectors/index.php" on line 44 (beta-5) with checkPolicy().
<?php
/* initialize the proper context */
$ctx = isset($_REQUEST['ctx']) && !empty($_REQUEST['ctx']) ? $_REQUEST['ctx'] : 'mgr';
$modx->initialize($ctx);
if (defined('MODX_REQP') && MODX_REQP === false) {
} else if (!$modx->context->checkPolicy('load')) { die(); } //This is the incriminated line
The odd part is that it works in all other browser.
And the right context is well sended since i can echo it before the line who cause the crash.
Is this a bug and should be in Jira or is there a problem with my localhost install (Wamp)?