Viewing 4 replies - 1 through 4 (of 4 total)
  • I can’t view a preview page link in wordpress (it wants you to be logged in). You’ll have to publish the page and provide the link to it in order for me to see it.

    Also, please provide the shortcode you are using.

    Are you set to ‘both’ in the EBD settings? When you say you received the email with the download, are you sure that the email actually contained a link to the download or did it just tell you what was being downloaded (just as text, not as a link). I ask that because if you are set to ‘both’ or to ’email’ then EBD will send 2 emails out. One goes to the wordpress administrator (usually) and I call that email the “notification email”. It just tells you something was downloaded, but doesn’t actually have a link to the doownload. The other email goes to the email address that the website visitor typed into the form when he visited your page, filled in the form, and hit submit. In many cases, that second email doesn’t actually make it into the inbox. Often, people test their new EBD set up by typing in their own email address (which is often the same as the wordpress admin email address) into the form and hit submit and then they get 1 email and think things are working but really should have gotten two emails. Anyway, I realize that’s confusing, but basically you should be using a different email address to test with … like a gmail or yahoo mail address that is not the same as the wordpress admin email address. That way you can make sure both emails get through. Often, when you are on a shared hosting environment, which many wordpress sites are, then that second email — the one with the actual link to the download — gets blocked by google or yahoo or whoever because they think it’s spam due to the fact it’s being sent from a shared hosting system and the From: of the email address won’t match up the way it should (hard to explain).

    Thread Starter maria90

    (@maria90)

    Hi,

    Thanks for your reply.

    I confirm you that:

    – we have set “delivery mail”
    – we receive correctly two mail (user and admin)
    – in the user mail the link work perfectly (we can download the file)
    – the only thing that doesn’t work is the confermation message in the form.

    This is the preview page: https://dietaanticancro.it/prova/
    This is the shortcode: [email-download download_id=”2873″ contact_form_id=”2871″]

    Thanks

    Maria

    When the website visitor clicks Submit on your form, it posts the information vi ajax to the server and the server responds with a little bit of JSON. That JSON is getting corrupted because your system is set to display PHP warnings and the PHP warning message is getting mixed in with the JSON response. This is a fairly common problem. You need to turn off WP_DEBUG (or otherwise make PHP warnings stop displaying to the screen .. some folks like to just make that stuff go to a file rather than to the screen, which is what I do .. if it’s set to go to screen then it messes up that ajax transaction).

    This is what gets returned from the server:

    
    <br />
    <b>Notice</b>:  Undefined index: ebd_downloads in <b>/var/www/dietaanticancro.it/wp-content/plugins/email-before-download/email-before-download.php</b> on line <b>432</b><br />
    {"mailSent":true,"into":"#wpcf7-f2871-p2890-o1","captcha":null,"message":"Grazie per il tuo messaggio. \u00c8 stato inviato.","onSentOk":["document.getElementById('wpm_download_1').style.display = 'inline'; document.getElementById('wpm_download_1').innerHTML='The link to the file(s) has been emailed to you.'; "]}
    

    That first part with the “Notice: Undef…” blah blah is the problem. To be clear, it’s the warning text itself that is the problem. What the warning is complaining about can be ignored — that’s not a problem. You just need to make the warning stop or at least stop going to the screen. Turn off WP_DEBUG or make it go to a file or whatever.

    Thread Starter maria90

    (@maria90)

    Hi,

    I confimr that the problem was the WP_DEBUG.
    Thank you, problem solved!

    Maria

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Form doesn’t work properly’ is closed to new replies.