-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
same avatars for everyone after upgrade to v1.1.0 #1234
Comments
Some of the larger avatar changes was in 80f900e |
@ptman This might be the reason but for larger installations this bug can be really annoying, especially if you use avatars to distinguish commits and accounts. |
The issue is most likely in the migration script which translates the old user-id based avatar filenames to md5 based filenames and updates the DB accordingly. All the filenames are correctly updated, but the database will no longer reference the correct avatar after migrating. Make sure you keep your db backup from before the migration, as fixing the user avatars without this backup will require manual work! |
@mjwwit Well, it is a private instance with 3 accounts so I updated everything manually. Nevertheless one should fix the update script. |
got the same bug in my updating, can only rollback to v1.0.2. |
@mjwwit since in the database, I can see the last migrated md5 on all users, I think it's here gitea/models/migrations/v20.go Line 61 in 74cde12
|
I'm getting this as well. All my custom avatars (I have 2890 users, many which have custom avatars uploaded) be the same avatar! I added a few Printfs to the Migration v20.go file, migrating up from v15, and I see this:
As you can see, there is no WHERE condition to set |
@WolfgangKluge You got the wrong line number there that is causing this, as the UPDATE call wasn't done right, apparently. gitea/models/migrations/v20.go Line 66 in 74cde12
As I wrote above, setting the ID to userID doesn't cause it to render a "WHERE id = ?" |
Is this "WHERE" being excluded only happening for MySQL? Never mind, verified this was doing it in Postgresql too. |
@richmahn I thought of this common mistake: https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables The line I mentioned is only the first of a sequence.. |
Please feel free to reopen this. |
[x]
):Description
After replacing my v1.0.2 gitea binary with a new v1.1.0 one and starting gitea, all avatars are the same (it was an avatar of a group). All images itself are still in the
avatars
folder on disk but gitea only shows one for all accounts (user/groups). I cleared my cache but I had to upload all avatars again to get them connected to all user accounts and groups.The text was updated successfully, but these errors were encountered: