fix: Avoid failing to update the current version entry if there is none#38800
fix: Avoid failing to update the current version entry if there is none#38800juliusknorr merged 4 commits intomasterfrom
Conversation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
|
/backport to stable27 |
|
/backport to stable26 |
|
@artonge Unfortunately your approach doesn't work as it would try to create the version twice when creating and calling putContent, once with the NodeCreatedEvent and once with the NodeWrittenEvent. Did you have any concrete concern regarding my approach of just catching potential not found rows when trying to get the existing version? |
Signed-off-by: Louis Chemineau <louis@chmn.me>
|
I updated the condition, tests seem happy now :) |
|
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
|
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
|
/backport to stable27 |
|
/backport to stable26 |
|
Hey @juliushaertl Still on issue. Just got this error on Nc 28.0.1 Dose this need to be merged to NC 28 ? please see error below |
|
Same problem in 28.0.6. |
|
I'm still having this problem, I have just installed the latest (Nextcloud Hub 9 (30.0.5)). |
Signed-off-by: Julius Härtl jus@bitgrid.net
"SELECT * FROM *PREFIX*files_versions WHERE (file_id = :dcValue1) AND (timestamp = :dcValue2)";#41174Summary
I managed to reproduce the error by having a file without a versions entry as it would be the case for files from before the upgrade to 25.
Steps to reproduce on latest master:
The first attempt to save will not create a version as the size is 0 and
server/apps/files_versions/lib/Storage.php
Lines 227 to 228 in c3475f4
It seemed reasonable to me to just create it in this case.
TODO
Checklist