Skip to content
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

Breaking change: 10.2 changes avatars location #35311

Closed
j-snd opened this issue May 23, 2019 · 17 comments · Fixed by #35363
Closed

Breaking change: 10.2 changes avatars location #35311

j-snd opened this issue May 23, 2019 · 17 comments · Fixed by #35363
Assignees
Milestone

Comments

@j-snd
Copy link

j-snd commented May 23, 2019

Hi,
after upgrading with Debian package manager from 10.1 to 10.2 all avatars have gone. I have upgraded two different servers and avatars disappeared at both.

Operating system:
Debian Linux Stretch 9.9
Web server:
Apache Version 2.4.25
Database:
mysql 14.14 Distrib 5.6.30
PHP version:
PHP 7.0.33-0+deb9u3
ownCloud version: (see ownCloud admin page)
10.2.0 (stable)
Updated from an older ownCloud or fresh install:
10.1.1 (stable)
Where did you install ownCloud from:
deb http://download.owncloud.org/download/repositories/production/Debian_9.0/ /

Regards
Jochen

@davitol
Copy link
Contributor

davitol commented May 24, 2019

@j-snd Thanks for reporting. Were the avatars hosted in an LDAP server or they were regular users

@j-snd
Copy link
Author

j-snd commented May 24, 2019

The avatars were from regular users. In the meantime I have upgraded another server by installing the tarball and all avatars are removed too. Did no one else had this problem? Is there a way to restore the avatars without going back to the previous version of owncloud?

@micbar micbar added this to the backlog milestone May 24, 2019
@davitol
Copy link
Contributor

davitol commented May 24, 2019

Just tested with a tarball too and I was able to reproduce it too. The info of the avatars persists in the backend but they are not shown in the webUI

@micbar micbar added the p3-medium Normal priority label May 24, 2019
@micbar
Copy link
Contributor

micbar commented May 24, 2019

could be related to owncloud/enterprise#3332

@wassereimer86
Copy link

wassereimer86 commented May 25, 2019

I upgraded from 10.0.2 to 10.2.0 manually and have the same problem. The Data folder is not in the installation direrctory and the avatars are still there. They are regular users. php 7.1.

If i upload a new avatar it´s not located in the avatars folder. So the path seems to be messed up.
Before: datafolder/avatars/xx/...
After: datafolder/xx/...

@VicDeo
Copy link
Member

VicDeo commented May 29, 2019

most likely broken with 18dc418

@VicDeo
Copy link
Member

VicDeo commented May 29, 2019

yep, checkout to f5ae32e changes the behavior.
#34592 introduces that

@VicDeo VicDeo mentioned this issue May 29, 2019
12 tasks
@VicDeo
Copy link
Member

VicDeo commented May 29, 2019

@micbar FYI: 10.2 pollutes data folder on avatar upload.

@micbar
Copy link
Contributor

micbar commented May 29, 2019

@micbar FYI: 10.2 pollute data folder on avatar upload.

@cdamken @pako81 @voroyam
Could be that you see avatars wrongly uploaded in customers data/ folders instead of data/avatars/

@VicDeo
Copy link
Member

VicDeo commented May 29, 2019

the fix for this issue is oneliner but we might need a repair step now to collect the garbage directories. :/

@VicDeo
Copy link
Member

VicDeo commented May 29, 2019

@j-snd could you try the change from #35363 ?

@j-snd
Copy link
Author

j-snd commented May 29, 2019

Hi VicDeo, I have changed Avatar.php and all missing avatars show up again. Was it this what I should try?

@VicDeo VicDeo changed the title Upgrade from 10.1 to 10.2 removes avatars Upgrade from 10.1 to 10.2 changes avatars location May 31, 2019
@VicDeo VicDeo changed the title Upgrade from 10.1 to 10.2 changes avatars location Breaking change: 10.2 changes avatars location May 31, 2019
@micbar
Copy link
Contributor

micbar commented May 31, 2019

@VicDeo Do you think the repair step is really necessary?

@pmaier1

@wassereimer86
Copy link

If someone uploaded a new Avatar because the one befor was gone: Is it there after the update without a repair? Or does the User again have no Avatar? That´s the question which should answer the one above me.

@micbar micbar modified the milestones: backlog, development May 31, 2019
@VicDeo
Copy link
Member

VicDeo commented May 31, 2019

@micbar old location is a subdir of data/avatars. md5 of uid with chars 1-2 and 3-4 treated as directory names
e.g if md5(uid) is 16fdfa8f744211bb1f44be3042e5ebeb the avatar will be stored under
data/avatars/16/fd/fa8f744211bb1f44be3042e5ebeb/
for 10.2 it is just data/16/fd/fa8f744211bb1f44be3042e5ebeb/

  1. everybody started with 10.2 will have the same issue with 10.3 because the fix reverts new avatar location to the old one
  2. data folder will have stray avatar directories like 16 in the example above as the new location is not unified

@pmaier1
Copy link
Contributor

pmaier1 commented Jun 3, 2019

@VicDeo Do you think the repair step is really necessary?

Well, we should clean this up properly, yes.

@pmaier1
Copy link
Contributor

pmaier1 commented Jun 3, 2019

PR for release notes known issue owncloud/docs#1294

@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants