Internal server error on avatar change

Bug #1288919 reported by Miroslav Remák
8
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.

Tags: avatar
description: updated
description: updated
Revision history for this message
kaputtnik (franku) wrote :

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 :-)

Revision history for this message
kaputtnik (franku) wrote :

No chance to edit my post, so here is the missing thing:

after editing the "wlprofile.json" file i readded the contents to the database with:

./manage.py loaddata ~/wlprofile.json

and

./manage.py snycdb

kaputtnik (franku)
Changed in widelands-website:
status: New → Fix Released
wl-zocker (wl-zocker)
Changed in widelands-website:
status: Fix Released → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Thanks, the patch looks sane. I try to apply it soonish

Changed in widelands-website:
status: Fix Committed → In Progress
Revision history for this message
kaputtnik (franku) wrote :

Fine, and thanks a lot for clarifying ;)

Revision history for this message
SirVer (sirver) wrote :

Your analyses seems correct to me. Thanks for spending time on this!

I remove the two lines in r380.

Changed in widelands-website:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.