Hi,

I'm using Webform together with the FileField Sources module so I can attach large files to the webform.

This has worked perfectly fine until I upraded to the latest Drupal 7.38 core.

Here are my steps:

1. Upload large file to the webserver folder files\file-attach
2. Create the webform and "Attach" the file (I can see the server side file, select it, and click attach)

At this point I see "Please wait..." with the spinner next to it, quickly followed by a dialog with the following text:

An AJAX HTTP request terminated abnormally.
Debugging information follows:
Path:
/file/ajax/field_private_file/und/0/form-XXXXXXXX-XXXXX (the X's are a bunch of letters and numbers)
StatusText: n/a
ResponseText:
Error
The website encountered an unexpected error. Please try again later.

ReadyState: undefined

The file is moved from the files\file-attach folder to the files\private folder, but the webform is not updated so it still shows nothing attached (and thus I can't protect it).

Any idea what is going on and how I can fix this?

Comments

jigish.addweb’s picture

I think this issue is for large amount of data passing. Please try increasing your max_allowed_packet setting in MySQL. So for this you need to increase value of `max_allowed_packet = 16M` or more and this is exist in my.cnf file.

After perform above solution and not getting correct then you need to check manualy for database error log if any.

I found the Drupal Reports "recent log messages" to be very helpful. Mine was a syntax error reported by mySql. The fact that it didn't output this is probably down to some mis-configuration on error log, find database error from admin/reports/dblog and resolve mysql error (if any).

Let me know if you face any query regarding this.

Thanks!

mverhagen’s picture

Jigish,

Thank you for your response. Unfortunately, it has nothing to do with the size of the file. Even a 144 bytes small file fails.

The recent log messages does not show ANY message (I clear it first, then try to attach the file). The webform acts as if nothing happened, but in fact it did copy the file from the "file_attach" folder to the "private" folder, and it added the file to the database in the file_managed table. So all actions succeed, just the webform does not update that the file is now attached to the webform.

If I then try it again, that's when I get errors in the log (duplicate file name, can't find file in file_attach folder, etc). All of these errors make sense of course.

I'm really at a loss what is going on. I'd like to find somebody that can look at this issue for me, do you know of any good place to hire Drupal experts that would be able to look at the problem and fix it for me?

Naurisr’s picture

Here https://www.drupal.org/node/2466247#comment-9956055 at #24 is the patch to fix the problem

berliner’s picture

Status: Active » Closed (works as designed)