You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auto-delete tags when a tagged file isn't visible any more #12858
When a file was tagged or marked as favorite, that information needs to be cleaned up from the database whenever:
The file was deleted (or moved to trash)
The file was unshared
The file was moved out of view from a share recipient (ex: owner moves it out of the share)
After discussing with @schiesbn it seems that we'll need to listen to several hooks to cover all these cases.
Ideally I'd like to have a generic hook called "when file goes out of view", if possible.
One idea would be to have a method deleteOrphaned($tagType) on ITags that does a simple SQL delete for a given tag type. That is certainly more efficient than iterating of folder entries.
So: first delete files, then delete orphaned entries. Like some kind of afterwards cascading delete.
That method could then also be used by repair steps.
Activity
PVince81 commentedon Jan 12, 2015
One idea would be to have a method
deleteOrphaned($tagType)onITagsthat does a simple SQL delete for a given tag type. That is certainly more efficient than iterating of folder entries.So: first delete files, then delete orphaned entries. Like some kind of afterwards cascading delete.
That method could then also be used by repair steps.
PVince81 commentedon Jan 12, 2015
Fix for 1): #13284
PVince81 commentedon Jan 14, 2015
Raised repair step ticket to cleanup orphaned tags: #13334
PVince81 commentedon Jan 20, 2015
Defer to 8.1. (CC @DeepDiver1975)
Maybe the background job is the way to go, especially if the logic to resolve shares is slow/complex.
PVince81 commentedon Apr 15, 2015
Ok so now we have the repair step for orphaned tags: #13344
Do we also want it as background job / cron ? (just like for shares)
PVince81 commentedon Feb 11, 2016
We have a background job now #21990
lock commentedon Aug 6, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.