Page 1 of 1

Can't upload images

PostPosted: 25 Mar 2013, 18:00
by oaao
Getting some strange errors when uploading images:

500: Apartment and its behaviors do not have a method or closure named "getMainThumb"


and on /images/main/upload/id/xx?PHPSESSID=....&qqfile=...jpg, I'm getting

Getting content length is not supported.


Any idea? It would also be helpful if the error messages in admin were more explicit. It's usually just "failed" with no further info.

Re: Can't upload images

PostPosted: 25 Mar 2013, 18:13
by oaao
console showed this:

Code: Select all
<h1>PHP Error [2]</h1>
<
p>imagecreatetruecolor() [<a href='function.imagecreatetruecolor'>function.imagecreatetruecolor</a>]: Invalid image dimensions</p>
 


and remembered I changed
"Maximum width for object's photos (0 - no limit) *"
and
"Maximum height for object's photos (0 - no limit) *"
to 0.

Changing these to high values (5000) fixed the problem. That means there's a bug, as 0 doesn't work as a value.

also, "Сохранено!" after changing an admin setting needs a translation

Re: Can't upload images

PostPosted: 26 Mar 2013, 16:08
by Xpycm
oaao wrote:Any idea? It would also be helpful if the error messages in admin were more explicit. It's usually just "failed" with no further info.


Hello.
There is no such an error in our demo version http://re-free.monoray.net ( and my local copy of ORE) as well as on websites of other users, so we can give you no advice.

Re: Can't upload images

PostPosted: 26 Mar 2013, 16:10
by Xpycm
oaao wrote:also, "Сохранено!" after changing an admin setting needs a translation


Thanks for error.
Solution:

In modules\images\controllers\backend\MainController.php file
instead of:
Code: Select all
Yii::app()->user->setFlash('success''Сохранено!'); 

write:
Code: Select all
Yii::app()->user->setFlash('success'tt('success_saved''service'));