Very true. It's only fired when you update meta_data.
IMHO, we need to know (or define) what to be considered a page update. Could be:
- A page's (collection) direct updates, e.g. page properties, permissions, versions, design, and maybe other stuff.
- Any update related to the page, e.g. block add/remove/edit
My 2 cents: Since most of the work is actually on block level, it may help to have block level events, from which you can derive the page where the block is located, and then do the required action.
i think on block's parent collection version update might be more appropriate as that would encompass any meaningful change to a page object and thus it's collection via it's area and block associations.
thanks for adding that Remo. I almost dropped a bunch of code before seeing that one. In my case on_page_add wouldn't be useful in my case as a page/collection is added with zero content which while useful in some instances wouldn't be for what I am looking at doing, more about actually approved content.
or if a page is added and is approved and thus actually on the site. Okhayat I wanted to personally thank you for bringing that inadvertenly to my attention as that is exactly the event I wanted to tie into.
This thread ended a little specifically -- on_page_version_approve is nice but not always all we need. For example I currently have a client wanting admin users to be notified when an underling makes updates to a page (and that page becomes pending approval). Clearly on_page_version_approve is useless to me as I need something triggered before that.
So given I'm under a tight schedule, I hacked in my mailing routine to run from the check-in process script under the else condition, which is for these purposes thrown when a user hits Preview My Edits. Not very elegant, but it'll do the job for now.
If anyone else feels like doing the work to find a more graceful way to invent this event, please feel free to post.
just checked the code in the trunk, and it looks like it should fire, look at the update function in /models/page.php its at the bottom of the function
When I look at startup/process ~line 716 you should find an update but it only gets called if you change page properties.
The documentation isn't very clear about it:
http://www.concrete5.org/help/building_with_concrete5/developers/mv...
Can anyone confirm this?
Is there a way to hook into the "real update process"?