bupy7 / yii2-widget-cropbox

This widget allows crop image before upload to server and send informations about crop in JSON format.
BSD 3-Clause "New" or "Revised" License
91 stars 33 forks source link

Undefined index (dh/ dHeight/ dheight, x, y) #26

Closed Vungo0510 closed 7 years ago

Vungo0510 commented 8 years ago
screen shot 2016-05-23 at 12 47 03 pm

Hi, I'm encountering this problem after I cropped the image and clicked the 'Upload' button to upload it to the server. The 'NULL' on top refers to the result of my "var_dump($this->crop_info);" statement. I have tried changing dHeight to dh, dheight and it didn't work; same goes for x and y. This is how my model looks like:

screen shot 2016-05-23 at 1 50 17 pm

My controller method:

screen shot 2016-05-23 at 1 51 48 pm

My view page code:

screen shot 2016-05-23 at 1 52 34 pm
bupy7 commented 8 years ago

In controller instead Yii::$app->request->isPost:

if ($model->load(Yii::$app->request->post())) {
    // ...
}
bupy7 commented 7 years ago

No activity.