I have installed Webform Multiple File Upload on Drupal 7 and also installed Transliteration Module.

I have added the Attachments field with Multifile Option to my webform. When I tested the form it allowed me to upload multiple files without any issue . When checked the file location the uploaded files are not saved and more over the received email is without any attachements.

Any help is highly appreciated. Please do the needful.

Thank You

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attiks’s picture

Assigned: Unassigned » Jelle_S

Can you check your recent log for any error messages

Akshita’s picture

FileSize
23.24 KB

Thanks with the quick turn around.

I tested the form again no files are saved and checked the recent log messages. I did find the attached. (looks like no issue)

More Info :

I have installed and enabled Webform (), Webform multifile (7.x-1.x-dev) and Transliteration (7.x-3.0+7-dev (not sure why the version is displayed like this on my module list)

Requirement: Upload multiple files and send them as attachment in the email

Issue : I could able to upload multiple files but there are not sent as an attachment or saved to the location on the server.

Error on the field whose option is selected as 'multifile' : Undefined Index: #value in _webform_edit_file_check_directory() (line 172 of /var/www/sites/all/modules/webform/components/file.inc)

Latest Update

Justed noticed the different Upload Directory Paths (please see attached)

If the field type is "File" -allows only single file upload and this is saved in the upload directory path and the email contains the path to this uploaded file -Good (but my req is diff - multifile upload and send as attachments)

File : Upload Directory : sites/default/files/webform/
Multifile : Upload Directory : webform/

Also please find the attachment to file.inc

Please do the needul and let me know if any patches are required to be applied.

Thanks in advance

Akshita’s picture

FileSize
181.44 KB
217.63 KB
22.33 KB

continuation to the above ..

Please see the attachments and do the needful.

Thanks

Jelle_S’s picture

Title: Uploaded multiple files are not saved and also not shown as atatchements in the email » Uploaded multiple files are not saved and also not shown as attachements in the email
Status: Active » Fixed

Fixed in the latest dev. Some of the javascript was in the wrong order, and because of that files didn't get uploaded once you selected more than one file.

Akshita’s picture

but I am using the lastest dev version only . Do you want me to uninstall and install again?

Latest Update:

Sorry Jelle - I saw the latest updated dev version dated 4/4/12 so I have removed the webform_multifiles and installed again with the updated version.

But I have no luck - I tried to upload 2 files but I got an email with no attachments and also checked the /sites/default/files/webform (empty - no files were stored)

More Updates: Latest observations
With this updated version my 2 problems got resolved:

  1. On the field whose option is 'multifile' there is no error (Undefined Index: #value in _webform_edit_file_check_directory() (line 172 of /var/www/sites/all/modules/webform/components/file.inc)) when I edit the field
  2. Upload directory path for 'multifile' is same as that of 'file' option

But main problem is not resolved yet - no attachment and the files are not saved to the directory.

Please do the needful.

Akshita’s picture

FileSize
452.21 KB

Continuation to the above.

Jelle

I have noticed something weird now.

As I was getting an email with no attachment when uploaded more than one file with field whose option is "mutifile"

Test1 - on the field whose option is 'multifile' - I uploaded only one file and submitted the form and I got the attached error.

Test 2 : on the same form added another field with option 'file' and uploaded 1 file which was saved under uploaded directory (/sites/default/files/webform)

Weird : on Test1 and Test2 uploaded Directory paths are same but in Test1 I got an error saying that "destination directory is not writable" if this the case how I got the file saved onto same location in Test2 from the same form ????

Please do the needful.

Thank You

Akshita’s picture

FileSize
98.59 KB

Please see the attached .

There are no validations selected but still it prompts from my previous error image attached

attiks’s picture

Status: Fixed » Active

thanks for the debugging, will have a look later today

attiks’s picture

Regarding the error in #6, the problem is that orig_name is missing for some reason.

I tried it with all the latest dev versions of webform, transliteration and this module. I created a webform with 1 multifile element (not mandatory, web images checked) and i can upload 1 or more files with any problem (using chrome 17, IE 9, FF11)

  1. What browser are you using?
  2. Did you clear all caches?
  3. Webform version?
  4. Do you get any javascript errors?
  5. Any other modules enabled that might interfere?
attiks’s picture

I also tested the email, the files are added as links (text only mail), but as attachment it doesn't work anymore.

So everything is working (for us), including sending the files as attachment (plain text and html).

Akshita’s picture

Priority: Critical » Normal

1. Chrome / firefox / IE (same issue on all the 3 browsers)
2. Yes
3. webform (7.x-3.13)
Note : openpublic webform and webform are bothe selected on my module list
4. After clearing caches - No errors this time
5. No idea to which module you are referring to.

On my Module List the version of Transliteration shows : 7.x-3.0+7-dev ( Anything wrong with this????????????)

Bottom Line : Uploaded files are not either saved in the location or sent as attachments but the form is free from errors.

Question : when you install Transliteration dev version what it is shown on your module list (mine shows weird 7.x-3.0+7-dev )?

Please do the needful.

attiks’s picture

3/ Please try the latest version of webform 3.17 and make sure only one is available, check your profiles/openpublic/modules folder

Transliteration version is ok, i have the same

Akshita’s picture

FileSize
63.54 KB
948.07 KB

No luck attiks.

Per your suggestion upgraded webform to 3.17 and unchecked openpublic-webform.

When tried to access my form -attached is the error.

I am not sure I am the only one facing this problem .

attiks’s picture

you did ran update.php? amd clear caches?
try disabling the webform validation for testing.

Akshita’s picture

Yes I did -errror related to webform upgrade fixed.

But my original problem remains as it is. Not sure whats going on at my end. When it works for you -why not it is working at my end??

Please advice and do the needful.

attiks’s picture

So the recap:
1/ uploaded files aren't saved? If so any errors in watchdog and/or php error log?
2/ uploaded files aren't send by email as attachment: plain text and/or html mail?

You're using the latest version of drupal (7.12), webform (dev version), multifile (dev version) and you sure there are no other modules enabled that can interfere?

Any change you can give me access to the site, us my contact form to send the details if needed.

Akshita’s picture

1. Yes - No errors (I am looking into 'recent log messages' from the GUI)
I do not know how to check the php error log

2. Yes

The version of Drupal is 7.8 ,webform (7.x-3.17) and multifile (dev version), transliteration(dev version)

There are more than 70 other modules enabled -not sure which module you are referring to .

Due to firewall and protocol issues I cannot give access to my form.

Any other alternate please to fix my issue?

attiks’s picture

1/ If there's no error in the recent logs and there's no file uploaded, you'll have to check the php error log (on linux /var/log/php...)

2/ Do you see a link to the file in the email?

Try updating drupal to latest version (make backups first!) if that doesn't help try setting up a new drupal site using only the needed modules. If t works you can try enabling other modules. Without access to your site there's not much more i can do.

Akshita’s picture

FileSize
82.01 KB

1. Sorry could not able to trace the php error log (please see atatched -any help appreciated)

2. Attachments are blank whereas other form fields have data (Top of the email says (plain text))

I tried updating to 7.12 but it blowed up my site so roll backed the drupal core upgrade.

attiks’s picture

check your php.ini file for the location of the logs.

try starting with a new site based on drupal 7.12

Akshita’s picture

No Luck.

Upgraded Drupal Core to 7.12

webform to 7.x-3.17

webform multifile : dev version

Transliteration - Dev version

Disable webform validation and openpublic webform

Akshita’s picture

I do not want to give up so kept trying different ways :

Test 1 : Field with option 'file' - no more working (after the above said upgrades)

Test2 : Field with option 'multifile' - sends no attachment or no link in the email and also files are not saved onto the location

Test 3 : Field with option 'multifile' - when uploaded only one file -it is saved onto the location and sends the link to the file in the email

I am really frustrated with this webform mutifile module despite doing all the upgrades you have suggested.

Quick Question : Is there any upload button displayed for you for "multifile' option just like it will be displayed for 'file' option.

attiks’s picture

FileSize
16.95 KB
15.58 KB
15.34 KB
13.73 KB

@Akshita sorry to hear you're getting frustrated, we're doing all we can to help you, i attached 3 screenshots so you can see how it looks in FF 11, IE 9, Chrome 18, but fields are multifile fields and they work.

Of all the test you didn't see any errors in watchdog or php error log (to check the location goto admin/reports/status/php and search for error_log, it will show you the location)

Akshita’s picture

FileSize
18.56 KB

My appreciation for your patience in responding me and helping me to resolve this issue.

I filtered the logs on 'php' and saw the recent error message coming from my form. I am also researching on the error but I know may be you will come up with a solution for this error message.

I suspect may be this is causing the issue.

Please see attached.

Thanks again

Latest UpdateThere are no such errors in the 'recent log" today, "when running the same form. (Not sure how this happened)"

Akshita’s picture

FileSize
41.3 KB

@attiks -please attached status report

Akshita’s picture

FileSize
2.24 MB
33.03 KB
963.86 KB

Still no luck.please see attached new status report and the email I receive.

Akshita’s picture

FileSize
97.08 KB
177.45 KB

Please don't give up.

here is my latest observation (see attached)

1. The attachment field is selected as 'multifile'
2. on inspecting the same filed gives file type as 'file'

Akshita’s picture

FileSize
44.37 KB
attiks’s picture

things you can try
try another email program to check, there are known problems with outlook and encodings.
try moving the multifile out of the fieldset

Akshita’s picture

I did same issue. when the files are not saved -how can we expect the attachments in the email.

When we upload only one file it is saving and sending the link in the email .

attiks’s picture

@Akshita if the files are not daved there's has to be some kind of error report, either inside drupal, inside php (error) logs or inside webserver logs, did you check all of them?

"When we upload only one file it is saving and sending the link in the email " is this using a regular file field or multi file?

Akshita’s picture

"When we upload only one file it is saving and sending the link in the email " is this using a regular file field or multi file? - with multifile

After upgrading to the latest dev version of webform multifile

Type file is not working

Upload file path got swapped :

Before upgrade :

file : sites/default/files/webform
mutifile : webform/

After Upgrade:

file : webform/ (As a result this is no more working)
mutifile : sites/default/files/webform

??????????????????????????????????? (Not sure which direction I have to go to resolve this issue)

I looked into the page source -there is no attribute multiple for the attachment field :

File(s)
type="file" id="edit-files" name="files[files]" size="60" />
Akshita’s picture

FYI -I tried to submit the same form to my gmail account.when checked no attachment in the email.

attiks’s picture

Without log files this will be hard to debug, you can try installing devel and adding some debug statements to:

  1. _webform_validate_multifile, just add dpm($_FILES);
  2. same after $files = webform_get_multifile($fids);, add dpm($files);
attiks’s picture

Also check the database to see if the records created or not inside webform_submitted_data

Akshita’s picture

Sorry for bugging you ..

By any chance do we require Mime Mail Module and Mail System modules to be installed.

When I looked into the d/b the webform_emails - the col named attachments displays '0' in all the rows.

Jelle_S’s picture

When we upload only one file it is saving and sending the link in the email .

What you describe here should be fixed with this commit (04/04/2012)

http://drupalcode.org/project/webform_multifile.git/commitdiff/b3e352e?h...

Akshita’s picture

FileSize
45.95 KB
Akshita’s picture

attiks’s picture

Assigned: Jelle_S » Unassigned
Status: Active » Fixed
Akshita’s picture

Thanks for all the support.

Finally-I could able to upload and see the uploaded files URL's in the email as links. (This time I started from the scratch)

New Request: By any chance Is there a way to send the uploaded files as email attachments directly (not as url links in the email)??

attiks’s picture

send the uploaded files as email attachments can be done by webform (might be only in the dev version)

Akshita’s picture

I tried(though it allows only one file) but the email is not having any attachment rather a link in the body .

Also noticed at the top of the emails it says "plain text"

Do I need to install Mime Mail and Mail System modules and configure with webform module ?

No idea any clue please?

attiks’s picture

FileSize
18.08 KB

File as attachment is standard webform functionality, it works with or without html email
i1512354-44.png

Akshita’s picture

Thanks .

I did installed Mail System and Mime modules and the webform-multifile is now sending the uploaded files as attachments.

Good Job! :)

Akshita’s picture

Appreciate your help with multifile. I have no issues now.

But I have new requirement like there is condition that the form should allow only 5 uploads with total size of 25mbs.

Can we achieve this with webform multifile module?

Any help is appreciated.

attiks’s picture

Please create a new issues for this

Status: Fixed » Closed (fixed)

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