Still trying to figure this out. I did some testing: I made the class_key field not hidden and I found out a couple of things:
1) with the class_key not hidden, the value 'modDocument' is already filled in when I add a new resource, despite my default value of 'mgResource'.
2) when I try to save the resource nothing happens, and there is an error in my dev console that has to do with the post to assets/components/migx/connector.php (500 internal server error). This happens when I change the value of class_key to 'mgResource' but also when I just leave it to 'modDocument'. So by making the class_key field not hidden, I can't save a new resource anymore.
I also did some digging around in the migx files, and found that in core/components/migx/processors/mgr/migxdb/fields.php a few lines concerning the class_key where commented out. I put those back and tried to save a resource again, and what do you think.. it worked!
But I'm sure those lines where commented out because of a good reason.. So I'm hoping Bruno or someone else who knows why can tell me if it's safe to use them?
The lines that I added to core/components/migx/processors/mgr/migxdb/fields.php are:
$resourceClass= isset ($_REQUEST['class_key']) ? $_REQUEST['class_key'] : 'modDocument';
$resourceClass = $modx->sanitizeString($resourceClass);
$resourceClass = str_replace(array('../','..','/','\\'),'',$resourceClass);
$resourceDir= strtolower(substr($resourceClass, 3));
Thanks!
- Michèlle