The resource/duplicate processor fires OnResourceDuplicate, then calls $resource->duplicate, which duplicates the children if that option is set. The duplicate method of the modResource object doesn't fire *any* events, so that's why the event is only fired once.
I think it's a general principle in MODX that events are fired in the processors, if possible, and since the processor isn't really doing the duplication and definitely doesn't duplicate the children, it can't fire an event for each child.
I *think* the code to invoke OnResourceDuplicate could be moved (with some modifications) to the modResource duplicate() method, just above the duplicate children section, just below the line where $duplicateChildren is set, but I'm not sure what the side effects might be. If you try this, back everything up and be sure to remove the invokeEvent code from the processor or it will execute twice.
This is my best guess about what the code would look like in the modResource->dupicate() method:
$this->modx->invokeEvent('OnResourceDuplicate',array(
'newResource' => &$newResource,
'oldResource' => &$oldResource,
'newName' => $newName,
'duplicateChildren' => $duplicateChildren,
'prefixDuplicate' => $prefixDuplicate,
'publishedMode' => $publishedMode,
));
[Update] I filed a feature request for this:
http://tracker.modx.com/issues/9960
[ed. note: BobRay last edited this post 13 years, 3 months ago.]