I have field collection with only file fields. You can investigate - in this case $form won't contain #entity property which is necessary for altering it. So I've created small patch.

Files: 
CommentFileSizeAuthor
#3 field_collection.patch513 bytesGeorgique
PASSED: [[SimpleTest]]: [MySQL] 132 pass(es).
[ View ]
field_collection.patch689 bytesGeorgique
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch field_collection_0.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

Georgique’s picture

Version:7.x-1.0-beta5» 7.x-1.x-dev
Status:Active» Needs review

My patch is generated by PhpStorm, not sure it will pass check but let's try...

Status:Needs review» Needs work

The last submitted patch, field_collection.patch, failed testing.

Georgique’s picture

Status:Needs work» Needs review
StatusFileSize
new513 bytes
PASSED: [[SimpleTest]]: [MySQL] 132 pass(es).
[ View ]

Removing my local garbage from the patch

jmuzz’s picture

Issue summary:View changes
Status:Needs review» Closed (cannot reproduce)

I wasn't able to duplicate this with the latest repository version of field collections and 7.x-2.0-alpha3 of file_entity. I made a node with a field collection that had a file field and I was able to change the file in it. It is an old issue so I believe it is not a problem now, but if I am wrong please reopen with more details about how to reproduce.

Georgique’s picture

Status:Closed (cannot reproduce)» Needs review

I have a node with a field of field_collection type. When I am trying to edit this field I have no $form['#entity] property. And for me (and obviously it can be pretty common case) I want to get access to field_collection_item which is being edited.