Internal server error on avatar change
Bug #1288919 reported by
Miroslav Remák
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Widelands Website |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When I attempt to set my avatar, the site barfs "Internal server error". I have tried various sizes, file formats, with transparency and without, but to no avail.
I also need to note that I have currently NO avatar. It may have something to do with me registering before the default "anonymous" avatar was implemented, as the problem does not appear with a new account on my local server.
description: | updated |
description: | updated |
Changed in widelands-website: | |
status: | New → Fix Released |
Changed in widelands-website: | |
status: | Fix Released → Fix Committed |
To post a comment you must log in.
I could confirm this and, maybe, piovide a patch. I think its because of a missing path to the standard avatar of old registrations.
I created two users in my loacla copy of widelands website. Then i dumped the contents of "wlprofile" like this:
./manage.py dumpdata wlprofile.profile > ~/wlprofile.json
Then i edit this file and removed the standard path to "wlprofile/ anonymous. png" from one user.
After starting the server the behavior is like on widelands.org: No Avatar for the modified user, if i try to change the avatar an error is thrown. Thats because django? tries to delete an folder. The error occurs in "wlprofile/ fields. py". Because no standard path to the file is set, there is no file to delete.
The correction i have made was to comment two rows of code. I tested this:
user with no avatar-path: Create an avatar and deleted it again -> all fine, after that the anonymous-avatar is used
user with avatar-path: try to clear the anonymous-avatar -> nothing happend; add a new avatar and delete it -> the anonymous avatar is used.
So i think its all good. But because i am not familiar with the code, someone else may find a better solution :-)