Ok, armed with AD7six's obvious advice to use logging to see what was
going on, I revisited this issue as I never fully dealt with it, just
moved onto other things instead.

I have added various log calls into my code and after creating 10
records as a test case and then deleting those 10 records I got the
log info below (grouped for easier reading).  This clearly shows that
50% of the time CakePHP executes the delete action twice causing the
2nd call to fail as the 1st call has already deleted the record.

Can anyone explain why this is happening?

2008-12-16 09:59:24 Debug: Delete action called for record # 6814
2008-12-16 09:59:24 Debug: errorFlash() did not find an issue
2008-12-16 09:59:24 Debug: Read data: parent_model = Organisation
2008-12-16 09:59:24 Debug: Deleted record
2008-12-16 09:59:25 Debug: Delete action called for record # 6814
2008-12-16 09:59:25 Debug: errorFlash() found an issue

2008-12-16 09:59:29 Debug: Delete action called for record # 6805
2008-12-16 09:59:29 Debug: errorFlash() did not find an issue
2008-12-16 09:59:29 Debug: Read data: parent_model = Organisation
2008-12-16 09:59:30 Debug: Deleted record

2008-12-16 09:59:41 Debug: Delete action called for record # 6813
2008-12-16 09:59:41 Debug: errorFlash() did not find an issue
2008-12-16 09:59:41 Debug: Read data: parent_model = Organisation
2008-12-16 09:59:41 Debug: Deleted record
2008-12-16 09:59:43 Debug: Delete action called for record # 6813
2008-12-16 09:59:43 Debug: errorFlash() found an issue

2008-12-16 09:59:49 Debug: Delete action called for record # 6812
2008-12-16 09:59:49 Debug: errorFlash() did not find an issue
2008-12-16 09:59:49 Debug: Read data: parent_model = Organisation
2008-12-16 09:59:49 Debug: Deleted record

2008-12-16 09:59:55 Debug: Delete action called for record # 6811
2008-12-16 09:59:55 Debug: errorFlash() did not find an issue
2008-12-16 09:59:55 Debug: Read data: parent_model = Organisation
2008-12-16 09:59:55 Debug: Deleted record
2008-12-16 09:59:56 Debug: Delete action called for record # 6811
2008-12-16 09:59:56 Debug: errorFlash() found an issue

2008-12-16 10:00:03 Debug: Delete action called for record # 6810
2008-12-16 10:00:03 Debug: errorFlash() did not find an issue
2008-12-16 10:00:03 Debug: Read data: parent_model = Organisation
2008-12-16 10:00:03 Debug: Deleted record

2008-12-16 10:00:07 Debug: Delete action called for record # 6809
2008-12-16 10:00:07 Debug: errorFlash() did not find an issue
2008-12-16 10:00:07 Debug: Read data: parent_model = Organisation
2008-12-16 10:00:07 Debug: Deleted record
2008-12-16 10:00:09 Debug: Delete action called for record # 6809
2008-12-16 10:00:09 Debug: errorFlash() found an issue

2008-12-16 10:00:14 Debug: Delete action called for record # 6808
2008-12-16 10:00:14 Debug: errorFlash() did not find an issue
2008-12-16 10:00:14 Debug: Read data: parent_model = Organisation
2008-12-16 10:00:14 Debug: Deleted record

2008-12-16 10:00:22 Debug: Delete action called for record # 6807
2008-12-16 10:00:22 Debug: errorFlash() did not find an issue
2008-12-16 10:00:22 Debug: Read data: parent_model = Organisation
2008-12-16 10:00:22 Debug: Deleted record
2008-12-16 10:00:23 Debug: Delete action called for record # 6807
2008-12-16 10:00:23 Debug: errorFlash() found an issue

2008-12-16 10:00:29 Debug: Delete action called for record # 6806
2008-12-16 10:00:29 Debug: errorFlash() did not find an issue
2008-12-16 10:00:29 Debug: Read data: parent_model = Organisation
2008-12-16 10:00:29 Debug: Deleted record
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to