List Module - php-events onDelete

joomlamate

Member
I display a list module inside the details page of another list/form.

I am trying to run some code using the List PHP Events plugin - onDelete Hook - to delete records on other tables when a Row of the above list is deleted through the module (using the delete button on the right of each row).

But there, the $model->rowsToDelete is always empty. -Well not always empty. Sometimes it is, others it is not, and I can't say for sure, when it is happening and when it's not, and this has totally baffled me.
How can I make sure I am reaching the "rowsToDelete" of that list inside my module?

I suspect the fact that the module exists inside the details of another list/form might be the issue here.
I have tried with both Ajaxified module and without it among other things (which I don't remember to mention all here, as I am fighting with this for some days now.

Any input or other ideas would be highly appreciated!
 
Last edited:
I wrote the post just before leaving the office, after long struggling with the issue. Now that I read it, I realize it was not complete... so I added a bit extra info.
Also, when I say sometimes the $model->rowsToDelete works and others is not... I mean that:
After posting here and returning about 1 hour later, with no changes at all in my setup, the $model->rowsToDelete was working and contained data.
Everything the same, the exact same routine, the same code: 1 hour ago was returning nothing (empty arrays), then it returned the row that was about to delete.

I started experimenting on a 100% SQL solution with relationships and CASCADE as I don't feel 100% certain that the Fabrik approach will keep working.

@Nagtegaal - not what I was looking for, but thanks anyway for taking the time to respond. I appreciate it.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top