- Status changed to Fixed
over 1 year ago 4:49pm 21 June 2023 - Status changed to Fixed
over 1 year ago 4:49pm 21 June 2023
Critical because this leads to data integrity issues. The symptom is that you're unable to download files from TFT on duplicated groups. But it could have other implications such as if one of the file entities was deleted.
1. Create a learning path with at least one TFT file. Training A.
2. Duplicate Training A to Training B.
3. Duplicate Training A to Training C.
OpignoGroupManager::duplicateTraining() has logic to try to create a unique filename, but it does this by using the file ID as a prefix.
If you duplicate the same file twice, you get a third file entity, pointing to the same file on disk - this is invalid as far as Drupal is concerned.
It would be possible to fix this by making the anti-duplication logic more robust, and using https://api.drupal.org/api/drupal/core%21modules%21file%21src%21FileRepo... instead of raw copy().
However, there is no reason to make exact duplicates of the same file, instead different media items can point to the same fid. So uploading patch for that.
Fixed
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.