Wednesday, November 25, 2009

Re: Delete confirm

On 25 nov, 13:39, jburns <jeremybu...@me.com> wrote:
> This is failing before the delete happens. I just can't track down
> where the delete is failing, when the direct is happening and why it
> is trying to direct to a delete view. As far as I know you never have
> a delete view - the model function does its job and then redirects you
> to the view you prescribe in your controller. Just stumped really.

I'm confused why after asking "I want to ask the user to confirm that
he wants to delete
a record" you're confused that the solution you're following looks for
a view - the view for the confirmation message & form to present the
user.

I can guess you've copied and pasted the code from the article I
linked to without understanding what it does - it prevents your delete
function from running on a get request - by making use of the security
component's blackhole to prompt the user with a form to confirm
whatever function it is they asked for is really what they want to do.

If the error message is exactly as you typed - delete your
minimalistic app-overriden missing view error, refresh the page and
look for the text "Confirm you have created...."
http://code.cakephp.org/source/branches/1.3/cake/libs/view/errors/missing_view.ctp

- The error message tells you /exactly/ where cake is looking for the
view file you directly or indirectly asked to render - and by some
nifty Ctrl+F action in your controller(s) you can find out where in
the code it's triggering that.

hth,

AD

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: