Delete a content item does't lead to orphaned files

Created on 9 December 2021, over 3 years ago
Updated 21 August 2024, 8 months ago

Using Drupal 9.2.10 and FFD 2.0.6

I have a content item that has a media reference to some media entities. When I delete the content item, I would expect the orphaned media items to appear in the orphaned tab but they don't.

Did I misunderstood the purpose of this module?

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands parijke

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡°Pakistan hmdnawaz

    I have a file field in my content type, I attached a file to the node. I can see an entry in the file_managed and file_usage table for that file.

    Now I deleted the node, I see the file entry removed from the file_usage and the entry is still present in the file_managed table.

    But I don't see that file nor in the orphaned files and neither in the unmanged files.

  • First commit to issue fork.
  • Open on Drupal.org β†’
    Core: 10.2.x + Environment: PHP 8.2 & MySQL 8
    last update 11 months ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States albert78

    I just sent a marge request. As I mentioned there, it seems to fix issue, but it should be tested better, I just don't have time to do it myself.

  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    This patch fixed my orphaned file list, which was empty. Now it looks like the same list of files that have 0 usage.

    The change is minimal, allowing files to pass the filter if they were not used in a node (I think.. not sure what "type" is here, or why it needs this check).

    I have not tested beyond this yet.

  • Status changed to Needs review 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA
Production build 0.71.5 2024