Forums

Getting the file uploads to work.

dniezby 21 Jan, 2008
I've turned them on and it even goes through the submission. It sends me an eMail with the name of the file but it doesn't upload the file to any place.

I checked the uploads folder too.
dniezby 22 Jan, 2008
I did put that in the form and so far, it hasn't changed anything...Well, not it doesn't even give me the name.

I'm wondering if the problem is because I generated the table BEFORE I added the encrypt type.

Also, I'm using this code if you can let me know if there are any problems.

<input type="file" name="screenplay" tabIndex="21"/>


then on the Uploads Tab have this:Yes
screenplay: pdf (The space is only there to prevent the board from turning it into a smiley)
1200
1<br><br>Post edited by: dniezby, at: 2008/01/21 22:14
GreyHead 22 Jan, 2008
Hi dniezby,

All that looks good. And the order in which you generated the table shouldn't make any difference.

Please take a Form backup from the Forms Manager and post it here or send it to me at the address in my sig so I can take a closer look.

Bob
dniezby 22 Jan, 2008
Yup, it's confirmed. A newly designed form and new table. After adding the enctype='multipart/form-data' to the General Tab, it no longer even gives me a name of the file, nor does it even send the eMail message.

??? Baffling isn't it?
dniezby 22 Jan, 2008
what address in your signature?
The only link in your signature I see is to joomla.
dniezby 22 Jan, 2008
I sent it to your address as listed on the Component's page.
GreyHead 22 Jan, 2008
Hi dniezby,

Cool but I won't get it (unless Max spots it and forwards it to me). Please send to the address in my sig 'info at greyhead.net'

Thanks
Bob
dniezby 22 Jan, 2008
OOh, I see what you mean...And yes, you're right. That eMail got bounced back as undeliverable.

Sending it now.
GreyHead 22 Jan, 2008
Hi dniezby,

I only have a little time this evening so may have missed some things:[list]
  • For debugging purposes temporarily remove the Redirect URL and turn on debug in the General tab. (I also turn off validation to start with so I can send an incomplete form.)
  • The 'implode' line in the Autogenerated line crashes the form if the Agree box isn't checked.
  • You must have valid entries in the Reply to email and Reply to Name boxes on the General tab or the email will not send.
  • You have header code in the email template that may cause a problem as ChronoForms also adds html headers. (The css also won't show up in some email clients Outlook included I think.)
  • [/list]All that said I got a file to upload OK on my test site. And I get an 'Email sent' message in DeBug.

    Bob
    dniezby 22 Jan, 2008
    Cool, I'll give this a shot and report back.

    BTW, is there something I should do about the IMPLODE?
    GreyHead 22 Jan, 2008
    Hi dniezby,

    Probably comment it out for the moment. What do you intend it to do - I could only see the one Agree box on the form?

    I can sketch out some better code in the morning.

    Bob
    dniezby 22 Jan, 2008
    Comment it out on the SQL Generated code or remove it from my form?

    I actually just changed it to a radio button instead of a checkbox to see how that reacts.
    dniezby 22 Jan, 2008
    Ok, here is what I get.
    It ONLY happens when I use the enctype='multipart/form-data'. If I remove it, the mail gets sent and it provides me with a file name. If I add it, it uploads the file but, as you can see, I get this result.

    _POST: Array ( [first_name] => [last_name] => [address] => [mainphone] => [adtl_phone] => [eMail] => [script_title] => [log_line] => [brief_synopsis] => [Reg_No] => [prev_option] => No [held_prev_option] => [agree] => Yes [submit] => Submit )
    Case 2: Use template
    E-mail: 'Yes' custom
    Email not sent
    E-mail message
    
    From: Nightshade Studios [admin@nsfilms.com]
    To: dniezby@comcast.net, dniezby@nsfilms.com
    Subject: New Consideration Screenplay Submitted
    FORM RESULTS
    
    The following information was submitted.
    
    First Name:
    Last Name:
    Address: {Address}
    Main Phone:
    Additional Phone:
    Contact EMail:
    Type of Script:
    Screenplay Title:
    Logline:
    Brief Synopsis:
    Is the script registered?
    Registration Number:
    Was script previously optioned? No
    Who held the option before?
    Screenplay File:
    Agree to terms? Yes
    
    
    Submitted by 
    
    
    Warning: implode() [function.implode]: Bad arguments. in /home/XXXX/public_html/components/com_chronocontact/chronocontact.php(492) : eval()'d code on line 3
    dniezby 22 Jan, 2008
    I can't figure it out at all...

    If I add the enctype='multipart/form-data' it uploads the file but doesn't send an eMail.

    If I remove the enctype='multipart/form-data' it sends the eMail but doesn't upload the file.

    :unsure:

    I've commented out the IMPLODE statement and that makes the error code go away but doesn't change the above issues.
    GreyHead 22 Jan, 2008
    Hi dniezby,

    Your problem now looks very much like the one in this thread. Please have a look and check with your ISP - I couldn't make sense of the RackSpace recommendation. Perhaps with some more info we can work out how to get it to work.

    Bob
    GreyHead 22 Jan, 2008
    Hi dniezby,

    I've been digging around this a bit more. It seems that - in some circumstances - having enctype set for the file means that $_FILES works but $_POST is empty (and vice versa). Is this what you see in the DeBug report (though you'll only see $_POST there)?

    Bob
    dniezby 22 Jan, 2008
    I think so.

    Right now, I can't get both to work at all.

    It's either the name of the file or the upload of the file.
    dniezby 22 Jan, 2008
    Yes, Bob this seems to be the exact problem I'm having. Gonna read more of that thread.
    dniezby 22 Jan, 2008
    Ok, now that thread just confused me even more.
    GreyHead 23 Jan, 2008
    Hi dniezby,

    Do you have a Reply To email address in your form General tab?

    Is the form on-line? Can I see it, or better, can you email me an admin id and password that I can use to see if I can find out what's happening with the CF part at least.

    Bob
    dniezby 23 Jan, 2008
    Bob, I just eMailed you the info you requested.

    I hope we can fix this cause this is a really cool component and I was actually thinking of making a video tutorial for advanced styling of chronoform forms.
    GreyHead 23 Jan, 2008
    Hi dniezby,

    Thanks all received - I've emailed you with a little fix to make.

    Bob
    dniezby 23 Jan, 2008
    I eMailed you the results..
    Didn't work...But there was a change in the response.
    GreyHead 23 Jan, 2008
    Hi dniezby,

    As you know I looked at your form last night and, as far as I could see, everything was working OK except that the email sent by ChronoForms was being rejected by either the Joomla mailer code or the PHP Mailer that Joomla uses.

    Unfortunately neither of these return any diagnostics except 'True' of 'False' to say if the message was sent. I think the next step is for me to create versions of these two files with some debug code built in to help track down where the failure is.

    Bob
    raevana 07 Feb, 2008
    Go to the Upload tab and make sure you have enabled the checkbox for Enable Uploads. I missed this checkbox and was experiencing a similar frustration.
    Ruth
    dniezby 07 Feb, 2008
    This issue has been resolved...sorry...couldn't mark it resolved. It was a global configuration issue.
    GreyHead 07 Feb, 2008
    Hi dniezby,

    Great, thanks for letting us now.

    Bob
    This topic is locked and no more replies can be posted.