#5417 closed defect (bug) (fixed)
Avatar upload error mesage
| Reported by: | stefwilliams | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | low | Milestone: | 2.0 |
| Component: | Media | Version: | 1.9.2 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
When an avatar image is uploaded to a profile or BP group, if the filename is too long (I think), the crop fails, with a generic message: "There was a problem cropping the avatar".
The image is still uploaded but the crop fails, saying the image is not found.
A more helpful error message would be good.
(As an example, the attached image fails as an avatar upload. Rename it to something shorter, and it should work.)
Attachments (1)
Change History (5)
#1
@
12 years ago
- Component Core → Avatars
- Milestone Awaiting Review → 2.0
- Priority normal → low
- Type enhancement → defect (bug)
Thanks for the report. Actually, in your case, the file length is not the problem. The problem is the fact that you're uploading a file whose file is formatted like a BP avatar image file. When processing the crop, BuddyPress deletes all existing avatars before cropping and re-saving the new avatar. But because your new filename looked like an old avatar from BP's point of view, it was getting deleted too; as a result, there was nothing to crop, and BP threw an error.
It's an edge case to be sure, but we can work around it by ensuring that the existing file is not named the same as the uploaded file before deleting the existing one.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
failed avatar upload