This is a reproduce step.

1. Add new content type with Image and enable translation. (In this case I use 'Test')
2. Create node and add image to this.
3. See you file_usage table. You will see count column is 1.
Before enable translation
3. Content types -> Manage Fields -> Test, Edit on Image field, Click Enable translation
4. Check Enable field synchronization.
4. See your file_usage table. You will see count column is 5.
After enable translation
5. Edit node and save.
6. See your file_usage table again. Count will be decrease by 1.
Saving node
Saving node
7. Edit node and 5 times, row in file_usage will be disappear, file_managed either.
Saving node
8. At node page, you will see empty image.
Node view

Please see attached for more information

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Thanks for the detailed report. Can you try the patch at #1141912-26: Changing node language by moving down language list deletes files in file field? it's not exactly related but I suspect the underlying reason might be the same.

rutcreate’s picture

Which one should I use? A comment you send do not pass a test but before one is passed.

rutcreate’s picture

It does not work for me for both patch but thanks for your help.

plach’s picture

Ok, I'll try to have a look to this as soon as I have a minute and see if I can replicate the error. I suspect I'm seeing this too in a project of mine.

plach’s picture

@rutcreate:

Working on this: how many languages do you have on your site?

plach’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
904 bytes

The attached patch should fix the issue.

plach’s picture

Status: Needs review » Reviewed & tested by the community

#6 seems to be fixing the issue on my project. I'll commit it soon, unless failures are reported.

plach’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

plach’s picture

  • Commit b8d8b66 on 7.x-1.x, factory, et-fc, revisions by plach:
    Issue #1959614 by plach | rutcreate: Fixed Image is deleted by saving...

  • Commit b8d8b66 on 7.x-1.x, factory, et-fc, revisions, workbench by plach:
    Issue #1959614 by plach | rutcreate: Fixed Image is deleted by saving...