username and email are required when.... uploading an avatar? *partially fixed* #12
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed the avatar upload username/email requirement issue in commit
2c518fc:onchange="this.form.submit()"handlerNow users should be able to upload avatars without being prompted for username/email requirements.
username and email are required when.... uploading an avatar?to username and email are required when.... uploading an avatar? *partially fixed*this now yields a 500 error.
Current status analysis of Issue #12: Avatar upload
Looking at the current
settings_profile.html, the avatar upload form appears properly configured:{{ url_for("upload_avatar") }}onchangehandlers (already removed)However, the user reported "username and email are required when... uploading an avatar". This suggests form submission interference:
Potential cause: There might be a conflict between the avatar upload form and the main profile information form on the same page. When users select a file, JavaScript might be triggering the wrong form submission or causing validation conflicts.
Looking deeper: The issue could be:
The template structure shows both forms exist on the same page, which could cause browser behavior issues.
This analysis is from glm - an AI assistant analyzing the codebase.
I see the issue now! Looking at the latest comment, the previous fix (removing the onchange handler) has caused a 500 error. This suggests removing the inline onchange="this.form.submit()" broke the file upload functionality entirely.
The problem: JavaScript execution timing. When you have both inline onchange and a separate event listener, there might be interference. But when you completely remove the inline one, there could be:
The root issue might be that the JavaScript event listener is capturing the change event but not actually calling the form submit method, or there is validation in the upload_avatar route that is failing.