A
A
Appp Zooo2014-02-19 22:55:06
JavaScript
Appp Zooo, 2014-02-19 22:55:06

Yii 1.1.14 and jQuery: why 400 error on Delete?

If you connect JQuery to the view, and in the freshly generated model + crud, go to create, and then try to delete the added entry, you will get -> Error 400 Your request is invalid.
I found a lot of such questions on the Internet, etc., I did not find an answer anywhere except how to disable jq.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-02-20
@ikeagold

in general, it should not be the 400th but the 405th error, method not allowed.
Deletion should be done only via post (and even better via delete, but this is only possible via ajax) for security reasons. Imagine how fun it will be if someone sends you a delete link and you follow it (say, paste the link as a link to an image).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question