Creating a resource works like perfect by
$response = $modx->runProcessor('resource/create', $fields);
But running this code directly again with just changing the variables 'alias' and 'pagetitle' let the process stop. Does anybody have an idea what could be the reason for this?
$response = $modx->runProcessor('resource/create', $fields);
$fields['pagetitle'] = "Title-2";
$fields['alias'] = "alias-2";
$response = $modx->runProcessor('resource/create', $fields);
Maybe it is not allowed to run 'runProcessor' again without resetting or closing something?