XF 2.2 Unable to upload avatars

slothly

Member
Every time I try to upload an avatar, this error message comes up:
Oops! We ran into some problems. Please try again later. More error details may be in the browser console.

/account/avatar:1 Failed to load resource: the server responded with a status of 500 ()
core-compiled.js?_v=4c76f28a:57 PHP: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at
webmaster to inform them of the time this error occurred,
and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>

defaultAjaxError @ core-compiled.js?_v=4c76f28a:57
DevTools failed to load SourceMap: Could not load content for [FORUMLINK]/js/xf/hammer.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
 
@Brogan, I just spoke to my host and this was their response:

From what I can see from our end I have double checked and I can see the everything is working correctly. The https:// is working properly from all the points that it should and I cannot see the a new entry from the Error Log to indicate where the issue may be coming from, I can only see that there is a missing file - hammer.min.js.map

I am not sure what happened to 'hammer.min.js.map' since I haven't touched the forum since the upgrade, and I am just noticing this issue now.
 
That's not a core file so presumably it's being referenced by an add-on.
However, I would be surprised if that is the cause of the error.

Disable all add-ons and test in a default style to rule out third party code.
 
That's not a core file so presumably it's being referenced by an add-on.
However, I would be surprised if that is the cause of the error.

Disable all add-ons and test in a default style to rule out third party code.
Hmm, that's interesting. I had very few add-ons enabled at the time (the most significant one being MediaSites by JoshyPHP)

I just disabled all the add-ons now and tested again in the default Xenforo style. It's still giving me the same error in the console log:
DevTools failed to load SourceMap: Could not load content for https://blingring.club/js/xf/hammer.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
 
You can disregard that message. It's not related. (The main JS file is a standard XF file.)

Otherwise, @Brogan's comment is correct about the 500 Internal Server Error message being returned. This error is being output by the webserver (not XF or PHP) and it's just a generic message. We'd need more details from the actual error to provide any suggestions. It's very possible there's a misconfiguration from your host, for example.

BTW, can you attach files to a message? What if they're not an image file (like a text or zip file)?
 
You can disregard that message. It's not related. (The main JS file is a standard XF file.)

Otherwise, @Brogan's comment is correct about the 500 Internal Server Error message being returned. This error is being output by the webserver (not XF or PHP) and it's just a generic message. We'd need more details from the actual error to provide any suggestions. It's very possible there's a misconfiguration from your host, for example.

BTW, can you attach files to a message? What if they're not an image file (like a text or zip file)?
I've disabled the ability to attach files to a message, long before the new update. The only upload ability that users have on the forum, is for the avatars.

I just realized that I've been trying to upload GIF avatars (this is the standard for our forum) but I just tested a static image, and that went through just fine. So it seems that the issue is only occurring with GIF images. Is there a way to fix this? GIF avatars are important for our forum

Thanks for all of the help and patience!
 
Switch to GD in the attachment options in the ACP - can the same gif be uploaded then?

That could suggest an issue with php and/or Imagick.

What version of php is running?

Navigate to /admin.php?tools/phpinfo and screenshot the Imagick section.
 
Resizing a GIF avatar is also significantly more intensive than other formats as each frame is essentially an image on its own. It sounds like your host might have some sort of script execution time limit applied outside of PHP that is just killing the PHP process after a certain amount of time. They'd have to check that and potentially disable it (though I imagine they won't be willing to do that).
 
Apologies for the delays in response! I was side-tracked but now coming back to this issue

Switch to GD in the attachment options in the ACP - can the same gif be uploaded then?

That could suggest an issue with php and/or Imagick.

What version of php is running?

Navigate to /admin.php?tools/phpinfo and screenshot the Imagick section.
Just switched to GD, same error popping up. I'm running PHP 7.3.25

I went to the page you linked me and I can't seem to find the Imagick section? I CTRL+F 'Imagick' and no results returned back. Could it be under a different name?

Resizing a GIF avatar is also significantly more intensive than other formats as each frame is essentially an image on its own. It sounds like your host might have some sort of script execution time limit applied outside of PHP that is just killing the PHP process after a certain amount of time. They'd have to check that and potentially disable it (though I imagine they won't be willing to do that).
I realize that it is a more intensive process as the .GIF file format is pretty dated, but it is still an important aspect of my forum. We had the ability to upload GIF avatars with no file size limit cap, and had no problems for a year now. This issue only occurred after I upgraded to the new forum software.

I reached out to the host (Siteground) again and inquired about this. This was their response:
Maria G.: We have PHP limits but there are no logs on your account reaching these limits
Maria G.: If they can provide us with the process name we can add more seconds for the process to give it time to process

Or you can just migrate to vps and configure the server on your own hand.
I've been using Siteground for a while now and have been pretty happy with them. What are the advantages of using a vps? Do you have any recommendations on who to go with?

I'm not that savvy when it comes to server-side things but if you think it will help, then I can take a look into it.
 
Top Bottom