Receiving this error when using a file field inside a field collection:

"An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (128 MB) that this server supports."

The error occurs if the field collection field on the content type is set for:

Number of values = Unlimited

Maximum number of values users can enter for this field.
'Unlimited' will provide an 'Add more' button so the users can add as many values as they like.

CommentFileSizeAuthor
#11 fcerror.png97.48 KBAnonymous (not verified)
#10 fcerror2.png8.04 KBAnonymous (not verified)
#3 fieldcollection.png39.01 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jmuzz’s picture

Status: Active » Postponed (maintainer needs more info)

I tried but I wasn't able to duplicate this. I made a simple content type with an unlimited cardinality field collection and put a file field inside it. I was able to upload files into the field when creating a node. I tried it by using the upload button and by leaving the file name there when submitting the form.

Can you provide more specific steps to make this error happen?

Anonymous’s picture

First off @jmuzz, thank you for helping with the Field Collection issue queue, much appreciated as this module is critical to Drupal's future, and needs more volunteers to show it some love.

I'm having a hard time isolating this issue. It is somewhat intermittent as I was able to upload files from a file field in a field collection as recently as yesterday and no new modules have been added to the site since then.

It is not a php.ini file upload size issue.

I tested again today with a new field collection on a new content type and found that the error is occurring even when maximum number of values for the field collection field is set to "one".

I checked permissions and ownership of the upload directory, then changed to the default directory and confirmed this was accessible by adding the same file field to a non field collection content type and successfully uploading a file.

Anonymous’s picture

FileSize
39.01 KB
jmuzz’s picture

It seems to be a tricky message that many have run in to. It could be an issue with mod security if you are using it. Maybe one of these can help.

https://drupal.org/node/1928574

http://www.inmotionhosting.com/support/edu/drupal-7/311-fixing-the-an-un...

Anonymous’s picture

Thanks @jmuzz. I thought mod_security as well, but it is not running/installed.

Anonymous’s picture

Noticed one more thing. I created another field collection with a long text field and a file field. If I add text to the text field and do not attempt to attach a file to the file field, the node cannot be saved. The node/add form reloads as blank on save.

Anonymous’s picture

Tried a new content type, new field collection with only two fields, a long text field an a file upload with audio upload widget. Left upload directory as default. Everything is working normally.

I wonder if this was related to directory permissions?

Also, when I first created the original file upload field, I may have included a directory structure that was not yet created. ie files/new_dir without actually creating "new_dir" until after first trying to upload content at node/add/content-type.

In any case, I am closing the issue as Field Collections appears to be working as expected.

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
Anonymous’s picture

Status: Closed (cannot reproduce) » Active
Issue tags: +token insert, +file upload

I found the cause of the file upload error.

When my field collection contains a long text field with "Token Insert" enabled, any file upload field returns the error message.

Not sure if this is a known issue?

This is repeatable. If Token Insert is disabled on all text fields, the file upload field(s) works normally.

Anonymous’s picture

FileSize
8.04 KB
Anonymous’s picture

FileSize
97.48 KB
Anonymous’s picture

Title: Upload a file loops until max file size reached » Cannot upload file in file field when Token Insert enabled on any field