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

Versions author info is lost after delete and restore by share receiver #39571

Closed
jnweiger opened this issue Dec 8, 2021 · 5 comments
Closed

Comments

@jnweiger
Copy link
Contributor

jnweiger commented Dec 8, 2021

Seen in 10.9.0 beta1

  • user01 creates a file xxx.txt and shares it with admin.
  • add 'file_storage.save_version_author' => true, to config.php
  • both user01 and admin edit the file, to create multiple versions.
  • author version information is shown correctly as implemented in Feature/version metadata #39126 . OK.
  • admin deletes the file.
  • The trashcan has copies of the versioned file xxx.txt for both user01 and admin: (OK)
# ls data/user01/files_trashbin/versions/xxx.txt.v163892
xxx.txt.v1638928947.d1638929506       xxx.txt.v1638929221.d1638929506       xxx.txt.v1638929228.json.d1638929506  xxx.txt.v1638929442.d1638929506
xxx.txt.v1638928975.d1638929506       xxx.txt.v1638929221.json.d1638929506  xxx.txt.v1638929230.d1638929506       xxx.txt.v1638929442.json.d1638929506
xxx.txt.v1638928976.d1638929506       xxx.txt.v1638929222.d1638929506       xxx.txt.v1638929230.json.d1638929506  xxx.txt.v1638929454.d1638929506
xxx.txt.v1638928989.d1638929506       xxx.txt.v1638929222.json.d1638929506  xxx.txt.v1638929436.d1638929506       xxx.txt.v1638929454.json.d1638929506
xxx.txt.v1638928989.json.d1638929506  xxx.txt.v1638929223.d1638929506       xxx.txt.v1638929436.json.d1638929506  xxx.txt.v1638929455.d1638929506
xxx.txt.v1638929156.d1638929506       xxx.txt.v1638929223.json.d1638929506  xxx.txt.v1638929437.d1638929506       xxx.txt.v1638929455.json.d1638929506
xxx.txt.v1638929156.json.d1638929506  xxx.txt.v1638929224.d1638929506       xxx.txt.v1638929437.json.d1638929506  xxx.txt.v1638929456.d1638929506
xxx.txt.v1638929158.d1638929506       xxx.txt.v1638929224.json.d1638929506  xxx.txt.v1638929438.d1638929506       xxx.txt.v1638929456.json.d1638929506
xxx.txt.v1638929158.json.d1638929506  xxx.txt.v1638929225.d1638929506       xxx.txt.v1638929438.json.d1638929506  xxx.txt.v1638929457.d1638929506
xxx.txt.v1638929159.d1638929506       xxx.txt.v1638929225.json.d1638929506  xxx.txt.v1638929439.d1638929506       xxx.txt.v1638929457.json.d1638929506
xxx.txt.v1638929159.json.d1638929506  xxx.txt.v1638929226.d1638929506       xxx.txt.v1638929439.json.d1638929506  xxx.txt.v1638929458.d1638929506
xxx.txt.v1638929160.d1638929506       xxx.txt.v1638929226.json.d1638929506  xxx.txt.v1638929440.d1638929506       xxx.txt.v1638929458.json.d1638929506
xxx.txt.v1638929160.json.d1638929506  xxx.txt.v1638929227.d1638929506       xxx.txt.v1638929440.json.d1638929506  xxx.txt.v1638929459.d1638929506
xxx.txt.v1638929162.d1638929506       xxx.txt.v1638929227.json.d1638929506  xxx.txt.v1638929441.d1638929506       xxx.txt.v1638929459.json.d1638929506
xxx.txt.v1638929162.json.d1638929506  xxx.txt.v1638929228.d1638929506       xxx.txt.v1638929441.json.d1638929506  

# ls data/admin/files_trashbin/versions/xxx.txt.v163892
xxx.txt.v1638928947.d1638929506  xxx.txt.v1638929162.d1638929506  xxx.txt.v1638929228.d1638929506  xxx.txt.v1638929442.d1638929506
xxx.txt.v1638928975.d1638929506  xxx.txt.v1638929221.d1638929506  xxx.txt.v1638929230.d1638929506  xxx.txt.v1638929454.d1638929506
xxx.txt.v1638928976.d1638929506  xxx.txt.v1638929222.d1638929506  xxx.txt.v1638929436.d1638929506  xxx.txt.v1638929455.d1638929506
xxx.txt.v1638928989.d1638929506  xxx.txt.v1638929223.d1638929506  xxx.txt.v1638929437.d1638929506  xxx.txt.v1638929456.d1638929506
xxx.txt.v1638929156.d1638929506  xxx.txt.v1638929224.d1638929506  xxx.txt.v1638929438.d1638929506  xxx.txt.v1638929457.d1638929506
xxx.txt.v1638929158.d1638929506  xxx.txt.v1638929225.d1638929506  xxx.txt.v1638929439.d1638929506  xxx.txt.v1638929458.d1638929506
xxx.txt.v1638929159.d1638929506  xxx.txt.v1638929226.d1638929506  xxx.txt.v1638929440.d1638929506  xxx.txt.v1638929459.d1638929506
xxx.txt.v1638929160.d1638929506  xxx.txt.v1638929227.d1638929506  xxx.txt.v1638929441.d1638929506  

The copies saved for the share receiver admin does not duplicate the json files. BAD.
When admin restores the file, the version author information is lost. BAD.

Expected behaviour:

  • all trashbin copies replicate not only the versions but also the .json meta data for the versions.
  • author information is retained across delete/restore
@jnweiger
Copy link
Contributor Author

jnweiger commented Dec 9, 2021

@IljaN this is your's, I guess :-)

@phil-davis
Copy link
Contributor

phil-davis commented Dec 9, 2021

I will make some test scenarios that demonstrate this (and other workflows that I think will be useful and interesting to test). That should help us make sure to fix the various combinations of this beast, without accidentally regressing.

I will put it in a PR on top of the branch that has the current development, so that the devs can see initial test results, and choose what tests to cherry-pick.

@JammingBen
Copy link
Contributor

Should be fixed with the latest commit to #39516.

@JammingBen
Copy link
Contributor

Closing there as it should be fixed. Just re-open if that's not the case :)

@jnweiger
Copy link
Contributor Author

Confirmed fixed in 10.9.0 rc1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants