Hi, thanks for your response.
Are you duplicating the resource in the Manager? That event is in the form layer so it won’t fire when you duplicate a resource using code unless you’re running the duplicate.php processor.
I try to duplicate document via the «duplicate» button or via the contextual menu in the resource tree, not using code. I suppose that will run the duplicate.php processor, am I right?
I would like to get the document ID created by this action (when duplicating a document), is it possible? Do you have an example?
[Edit:] one more thing. you don’t need the if() statement at all if that’s the only event the plugin is tied to. You won’t be there unless the event has fired.
I use several events in my plugin, OnDocFormSave and OnDocFormPrerender. Both are responding when I write a log message (or code) into, but not OnResourceDuplicate.