2

I am trying to build a Expression engine field-type(add-on),where I will be storing the field-type data in a separate table(Ex:field_type_data).I am able to update the records of the table "field_type_data" whenever a entry or multiple entries gets deleted,through function delete($ids) in ft.fieldtypename.php which gets called whenever a entry is deleted and $ids is an array containing the ids of the entries that are deleted.

But I am not able to do the same when a channel itself is deleted by user.Because with the deletion of a channel all the entries related to that channel also gets deleted.

Can anyone help me please,how to and where I can know the list of entries related to the channel when it gets deleted.

Thanks in advance

1

hm... is no any special hooks for this in EE as I know. So possible solution is to create ext. on sessions_end or sessions_start and execute records cleanup in case if $_GET = "channel_delete" exist.

| improve this answer | |
1

Yeah, this is a bit of a problem. I usually just ensure I always JOIN my custom table back to exp_channel_titles when I access data, so that if the entry has been deleted without my knowledge, it will not show up in the SQL query results.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.