Quote from: splittingred at Aug 14, 2009, 09:49 PM
1. Post me the entire processor file that’s causing the error. You can attach it if you need.
2. Verify that your 3PC has a Namespace, a Lexicon, Lexicon Topic and a Lexicon Entry to test with.
3. Post me any stack trace PHP errors that occur.
4. Post me any related errors in core/cache/error.log
1. My processor is very simple:
<?php
if ($_REQUEST['photo_id']) {
$photo_id = $_REQUEST['photo_id'];
} else {
return $modx->error->failure('ID can not be empty'); //Here working like a charm
}
$photo_info = $modx->xcomp->photos_getInfo ($photo_id); //return one dimensional array or NULL
if (!$photo_info) {
$error = $modx->xcomp->getError(); //array with 2 keys: code, message
$error_msg = $modx->lexicon('xcomp.error').': '.$modx->lexicon('xcomp.error_code').' '.$error['code'].' - '.$modx->lexicon('xflickr.error_msg').' '.$error['message']; //var_dump is string: Error: Code 01 - Message Wrong photo ID
return $modx->error->failure($error_msg); //error
}
return $modx->error->success('Success msg', $photo_info); //if $_REQUEST['photo_id'] not null and correct I get normal response which using for JsonStore
?>
2. My 3PC has a Namespace, a Lexicon, Lexicon Topic and a Lexicon Entry and all working fine in other calls.
3. All related logs are empty
4. core/cache/error.log is empty
Only in Fifebug I have response
<br />
<b>Fatal error</b>: Call to a member function failure() on a non-object in <b>/var/www/dev/modx/core/components/xcomp/processors/mgr/photos/getinfo.php</b> on line <b>12</b><br />
and not
{"success":false,"message":"Err msg","total":0,"data":[]... which can be processed in ExtJS application