Suppose this caused by #384992: drupal_html_id does not work correctly in AJAX context with multiple forms on page

A bit debuging shows that $element['fid']['#value'] is empty in file_managed_file_validate()

CommentFileSizeAuthor
#2 770880-file-delete-d7.patch1.38 KBandypost

Comments

andypost’s picture

Steps to reproduce:
1) add a file or image field to any node-type
2) create node of this type with uploaded file
3) try to edit node and press "Remove" to remove uploaded file
4) ...nothing happens

Patch to fix validation, suppose this check should happen when "Remove" clicked!

andypost’s picture

Status: Active » Needs review
StatusFileSize
new1.38 KB

patch

sun’s picture

Status: Needs review » Needs work

The patch looks wrong to me, as the following code within that condition is logic that applies _not_ to the remove_button.

andypost’s picture

Status: Needs work » Closed (duplicate)