Write tests for the scenario where an entity that references a deleted file is loaded and then saved

Created on 30 January 2016, over 9 years ago
Updated 27 May 2025, 3 days ago

This is a followup for the tests suggested in #1443158-2: file_field_presave assumes that a file object has been loaded → which were never written as part of that issue.

📌 Task
Status

Active

Version

11.0 🔥

Component

file.module

Created by

🇺🇸United States David_Rothstein

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

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.

  • First commit to issue fork.
  • 🇮🇳India mohit_aghera Rajkot

    I believe this issue might not be required now.

    Since this issue was added to increase the test coverage on file_field_presave function.
    Since we have entire EntityReference mechanism happening inside FileFieldItemList, I believe this might not be required.

    There is another class EntityReferenceFieldItemList which is responsible for loading the referenced entities has enough checks.

    Considering that we might not need to add additional test case coverage.

    For testing purposes, I’ve added an additional test to ensure that things goes well.
    This test is passing on local.

  • Pipeline finished with Failed
    3 days ago
    Total: 435s
    #507150
  • 🇺🇸United States smustgrave

    PMNMI may be the right status but can the issue summary be updated with why this isn't needed?

  • 🇮🇳India mohit_aghera Rajkot

    Ahh, apologies for the confusion.
    I mean there won't be any errors now since it is handled in D8 core properly.

    We can merge the test as it is passing on the local.
    I've triggered the job again and will update the issue once it is green.

  • Pipeline finished with Success
    about 6 hours ago
    Total: 5471s
    #510016
Production build 0.71.5 2024