6 years ago
3
Topic

Hi,

I have a list and am trying to run some php when deleting an item.  I have seen this post (https://www.seblod.com/community/forums/general-discussions/event-before-delete-trigger) and created a custom plugin.  When creating the onContentBeforeDelete function it does not fire.  I also created a onContentPrepare function to verify the plugin was functional, which it was.  

Thinking SEBLOD may have created their own function I looked at the change log and saw this:

"onContentBeforeDelete" replaced by "onCckConstructionBeforeDelete"

I tried that function but had no luck there either.  

Any help on this would be greatly appreciated.

Thanks!

Get a VIP membership
4229 Posts
Kadministrator
6 years ago
2
Level 1

It depends on the object that you are using,but with article object event is triggered for sure https://github.com/Octopoos/SEBLOD/blob/master/plugins/cck_storage_location/joomla_article/joomla_article.php#L311

6 years ago
1
Level 2

These are Free Objects.  I'm looking at this file https://github.com/Octopoos/SEBLOD/blob/master/plugins/cck_storage_location/free/free.php, and it seems it does not have the hook to call onContentBeforeDelete, nor does it call onContentAfterDelete.  It looks like these might be put in in the future?  Lines 206 & 234.  

What would be the best way to go about having an event fired currently, since this functionality does not seem to be there?

4229 Posts
Kadministrator
6 years ago
0
Level 3

Hi,

then I'm afraid isn't much you can do except that you can do a pull request to implement this events in free object too.

Get a VIP membership