-
Notifications
You must be signed in to change notification settings - Fork 2.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
Delete Custom Dav Properties on file delete #33413
Comments
@micbar did you delete over Webdav or using PHP API ? If you delete over Webdav on the files endpoint, the Sabre engine should already trigger our custom properties plugin and delete the properties. It is know that if the deletion happens outside of it, the Sabre code is never initialized outside of Sabre routes so it has no chance to clean up. |
Possible solutions:
Whatever we do we'll need either a bkg job or a repair job to clean up existing installs out there, and that before telling the DB to add a foreign key (if we choose to go that route) |
@PVince81
|
Argh, so it means that even the Sabre delete routine doesn't work |
Same happens when deleting via Sync Client. |
In Files Lifecycle, we access the custom properties via an Entity Mapper. |
@DeepDiver1975 suggested to use the Mapper everywhere. |
I think we need to move the custom properties code to a lower layer. Sabre layer is too high as it's unreachable from PHP API. We need to move the custom properties to the PHP API, maybe the Node API or something. For now the quick fix is to write a background job to clean up, as we did for many other orphaned entries cases. |
Assigning @sharidas to write a cleanup background job. |
I have done 3 tests here. One on master branch, second on stable10 branch and third on 10.0.8 branch. Summary is that on 10.0.8 branch this issue is found and it is not found on master branch and stable10 branch. Master branch
Stable10 branch
10.0.8 Version
|
@sharidas thanks for the research. So this means the bug about "deleting over Webdav doesn't remove oc_properties" is already fixed on stable10, it's likely fixed on 10.0.10. We still need to look into a way to clean up stray properties when they're removed using PHP APIs. |
Steps to reproduce
Expected behaviour
All DAV Properties for this fileID should be deleted
Actual behaviour
The orphaned properties remain in the database.
Server configuration
Operating system:
MAC
Web server:
Apache2
Database:
MySQL
PHP version:
7.1
ownCloud version: (see ownCloud admin page)
10.0.8
Updated from an older ownCloud or fresh install:
fresh
Where did you install ownCloud from:
git
Signing status (ownCloud 9.0 and above):
List of activated apps:
Possible Solution
The text was updated successfully, but these errors were encountered: