Can anyone see that the problem is with the following?

function delete($id = null) {
  if (!$id) {
    $this->flash(__('Invalid telephony number', true), array
('action'=>'index'));
  } else {
    $parent = $this->TelephonyNumber->read(array
('TelephonyNumber.parent_model', 'TelephonyNumber.parent_id'), $id);
    if ($this->TelephonyNumber->del($id)) {
      $this->flash(__('Telephony number deleted', true), array
('action'=>'index', $parent['TelephonyNumber']['parent_model'], $parent
['TelephonyNumber']['parent_id']));
    }
  }
}

It should delete the record and then redirect the user back to the
index action along with $parent_model and $parent_id so it can showing
a list of telephony numbers for the parent object.  But 9 times out of
10 instead of displaying the flash and redirecting it renders the
following error:

Not Found
Error: The requested address '/telephony_numbers/delete/6572' was not
found on this server.

Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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