• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Avatar cropping issue

Jim Boy

Well-known member
#1
Our users are getting errors when changing their avatar -

Fatal Error: Call to a member function thumbnailFixedShorterSide() on a non-object Yesterday at 11:14 PM - library/XenForo/Model/Avatar.php:263

Avatars are stored externally on S3. The S3 wrapper is initiated in index.php and the external data paths set in config.php. The S3 worked out of the box (unlike in 1.1.5) so I haven't modded that or use any relevant add-ons, such as Avatar as Attachment.

The avatars are uploading, just not getting cropped.

Also worth nothing that we run multi-server so their is no guarantee you will be on the same web server one call to the next.

Lastly running Imagick with pecl module 6.5.4-7 and imagick module 3.1.2 (latest stable)
 

Chris D

XenForo developer
Staff member
#2
their is no guarantee you will be on the same web server one call to the next.
This could be it. Is it possible that one of the servers no longer Imagick installed? Or perhaps become corrupt on one of the servers?

If you change your image processor from Imagemagick to GD in Admin CP, does the error go away?
 

Jim Boy

Well-known member
#3
This could be it. Is it possible that one of the servers no longer Imagick installed? Or perhaps become corrupt on one of the servers?
No chance, the average lifespan of my servers is is 16 hours, and it happens on all servers

If you change your image processor from Imagemagick to GD in Admin CP, does the error go away?
nope - it stays.

It would seem the image variable isn't getting created correctly,

$image = XenForo_Image_Abstract::createFromFile($avatarFile, $imageType);

would appear not to be creating an object, and it would seem the most likely culprit is the call to get the imageinfo from the avatar whilst the image resides on S3