Page 1 of 1

Question re: core event observations

Posted: Thu Aug 09, 2012 1:12 am
by fredp
Hi,

Summary:
I wrote a module that adds event handlers for certain "add", "edit", and "delete" events for content, template, and stylesheet objects. It works, but I noticed that certain Admin console operations don't send core events when they modify these type of objects. I did a quick investigation and found that bulk delete and copy operations don't send any of these events, nor does adding a new content page. It is unclear if these "holes in event coverage" are by design or by accident. So, I thought I'd ask here for clarification.

Details of Investigation:
Note: I investigated only a subset of core events, those of interest to my module--this was in no way a comprehensive investigation. I made a quick survey of the CMSMS 1.10.3 source code to determine which files contain code that sends any of the events that my module is interested in: "add", "edit", and "delete" events for either content, template, and stylesheet objects. Then, I made a simple matrix that lists each of those files with its associated Admin op. Finally, I added to the matrix those Admin op's that modify either content, template, or stylesheet objects, but don't seem to send any events before or after doing so. I attached an image of the resulting matrix to this post. Empty cells in the matrix indicate cases where no events are sent. These are the areas in question.

Results:
Unless I'm missing something, it appears that:
  1. Bulk delete operations for content, templates, and stylesheets don't send events.
  2. Adding new content/page doesn't send an event; in fact, no "add content" event is currently defined!
  3. Copy operations for content, templates and stylesheets don't send events.
Are these inconsistencies, or are things supposed to work this way?

Thanks,
Fred P.

Re: Question re: core event observations

Posted: Sat Aug 11, 2012 1:53 am
by calguy1000
Largely, they are inconsistencies. Though I wouldn't call them 'bugs' ...just something not consistent with other behavior.