-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[Bug]: Versions still appear in the Files view after running php occ files_versions:cleanup
#39046
Comments
This comment was marked as resolved.
This comment was marked as resolved.
cc @artonge |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as spam.
This comment was marked as spam.
Can you check your Nextcloud log and pull the stack trace or error returned when you attempt to access these bogus versions? |
Can you run the occ file:scan command and see if they are still visible ? |
I have this issue too and file:scan and file:cleanup doesn't fix it, I use a hetzner storage share and they saw after I deleted the files they were still showing in the database I also found this #37461 issue and I would suspect its related although for this its in reverse, it is not removing it in the database it needs to once the files are deleted through OCC or expire through the retention setting but it works if i do a manual delete in the webui |
Our installation appears to be suffering from the same ptoblem. Not caused by manual deletion, but possibly problems with external storage. The effect is as described though, and I would be interested in how to remove these stale database entries referring to version files that do not physically exist. |
I was not able to reproduce. Is the issue still occurring? |
What version you on? Because I do not believe anything has changed with v27 As for reproducing, all you gotta do is upload a file twice so it gets versioned then run the occ command to clear out all versions and you’ll notice while the files on disk is removed the database still have them so they’ll show in the versions list on the uploaded file for me this also applies with retention settings when auto cleared it also doesn’t clear from its database so it always shows all versions that ever existed just the version file itself no longer exists on disk EDIT: I just tested on my hetzner storage share which runs 27.1.5 and the issue remains, the versions all appear on the list for the file but they are deleted on disk, database is not cleared of them |
I can reproduce what @Zairhn did on Nextcloud v28.0.1.1 |
@justsomescripts @Zairhn I was not able to reproduce. Can you check if there is anything related in your Nextcloud server logs? You can check the log file just after running the command. |
the command is not versions:expire it is infact cleanup as the title of this bug report states, but I have had the same issue with versions:expire, I also don't have log access on hetzner storage share |
Hello, could one of you test this PR: #43263 |
Bug description
I may have run into a problem.
By mistake, I have manually deleted old versions directly in the Nextcloud
data
directory directly on the server.Then, after reading about the correct solution, I ran
php occ files_versions:cleanup myuser
.I was under the assumption that after this step, old versions will no longer appear in the Files app in the web interface.
They do appear, and obviously, they are inaccessible.
Is this the expected behavior and can this situation on my server be fixed?
Thank you for your reply and advice!
P.S.
I've marked the issue as a bug because I believe that after running
php occ files_versions:cleanup myuser
, the old versions should not appear regardless of my previous error.I did run
occ files:scan myuser
.Steps to reproduce
php occ files_versions:cleanup myuser
Expected behavior
old versions are no longer visible after running
php occ files_versions:cleanup myuser
(regardless if they had physically existed on disk or not)Installation method
None
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: