E
E
EVOSandru62015-01-29 04:16:12
Yii
EVOSandru6, 2015-01-29 04:16:12

Why is the model not deleted in yii through the usual delete item?

Good afternoon,
Why does deletion normally go through the grid widget ?
The following Url is formed:
/sadmin/product/delete?id=186
And it does not delete through the Delete menu item and throws out such an error
Error 400
Unable to determine CSRF.
Such Url is formed at the same time.
website/sadmin/product/delete?id=185
But when you hover over an item at the end, there is still a grid for some reason

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2015-01-29
@EVOSandru6

You also wrote an error: "Unable to determine CSRF".
What other questions could there be?
Removing data using the GET method is a bad form.
Well, on the topic www.yiiframework.com/doc/guide/1.1/ru/topics.secur...

A
Alexander Shapovalov, 2015-01-29
@shapovalov_org

If you really want to delete with GET, then please encrypt at least Id and a few more parameters in addition, at least in MD5, and already in the controller, analyze whether the parameters were valid.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question