Question re: core event observations

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am
Location: USA

Question re: core event observations

Post 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.
Attachments
Admin op to event matrix
Admin op to event matrix
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Question re: core event observations

Post by calguy1000 »

Largely, they are inconsistencies. Though I wouldn't call them 'bugs' ...just something not consistent with other behavior.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Developers Discussion”