-
-
Couldn't load subscription status.
- Fork 4.6k
Description
Bug description
We received a report that some files marked as favorites are not displayed in the "Favorites" view. Additionally, users cannot remove the favorite state from these files. This issue is similar to #49395.
- The lib/private/Tags.php implementation does not properly verify if a given tag already exists. Although a check exists, the list of tags is loaded only once and never updated.
- The database table lacks a unique constraint, allowing multiple identical tags for the same user.
I've started working on patch: #49674
But adding that index on existing systems and ironing out the various issues I ran into while diving through the code needs more work, and therefore we would appreciate the files team taking over.
Steps to reproduce
- Delete the favorite tag from oc_vcategory
- Select 2 or more files
- Mark the files as favorite (as batch action)
The code in lib/private/Tags.php does not check if the given tag already exists properly. There's a check, but the list of tags is loaded only once and never updated. Also, there's no unique constraint on the table, and therefore it's a valid state to have the tag more than once for a user.
Expected behavior
Tags with the same name should be handled gracefully.
