Forum Replies Created

Viewing 15 replies - 541 through 555 (of 777 total)
  • That error message is coming from Contact Form 7, not Email Before Download.

    In the CF7 form you made, the email info you put in there is for the Notification Email — that’s the one that goes to you and tells you what people downloaded. That’s the one that isn’t working for you. EBD will also send an email to the person who filled in the form on your website if you set EBD to “email” or to “both” in the EBD settings (which it sounds like you have). Thus, the CF7 email is not being sent properly and the EBD email is.

    You need to go back into your CF7 form that you made (the one you’re using in your EBD shortcode) and look at your email-related settings in there and see if things look ok. Maybe the To: is going to a bad email address rather than to you.

    That’s extremely unusual. It’s almost always the other way around. Does the email the user receive have links in it (like a link that you can click that actually downloads the file)?

    Check the To: field in the Contact Form 7 form you made. Is it set to the same thing as your WordPress admin email address (which is over in Settings / General or something like that)? Do you get email from wordpress (you can create & delete a wordpress user and it should kick you out an email)?

    If you get email to your wordpress admin email address and your wordpress admin email address is the same as the To: in the Contact Form 7 then that would be pretty strange…

    make sure you are using “your-email” as the field in your form name (in Contact Form 7). While I don’t see how having it named something else could cause the problem you are seeing, a couple of other folks have reported the same thing & they had given the email field some other name. So, make sure yours is “your-email”.

    Also, make a new test page. Make a new contact form (and make the field “your-email”). Upload a new file with a filename you have never used before. Make the file be a .jpg, not a .pdf. Try that. Post your shortcode into this ticket along with the test URL.

    are you set to “inline”, “email”, or “both”?
    are you set to masked URL?

    I don’t believe that can be done without modifying the PHP code. If you look in export.php you will see that the fields for the csv are hardcoded in there.

    That said, I think any extra fields that are POSTed in the form submission will end up in the field called “posted_data” as a big chunk of xml. You could then parse your phone number field data out of that xml and do something with it.

    What options have you selected in EBD? Do you have it set for masked or expiring URL? If so, you should definitely try it with that turned off. Masked URL accesses and sends the file in a different way than non-masked.

    If you look at your file in Download Monitor on the detail page, do you have “Redirect to File” checked?

    what version of Download Monitor are you using?

    You are using IIS as the webserver, right?

    nate.taylor –

    The way I found it is to use the DevTools in Chrome or Firefox (which is Firebug in Firefox but it’s built-in now so they call it Developer Tools or something like that).

    So I put it on the Network tab in the Tools. I also make sure “Preserve Log” is set to True or checked or whatever (not necessary for this because it’s ajax, but sometimes people’s ajax doesn’t work & it does a normal HTTP POST which will clear things). Anyway, I then fill in your form and hit submit and it -should- (and in your case does) log an ajax call.

    In Firefox, there are some little subtabs of the Network tab that let you filter by the type of calls — html, javascript, flash, xhr (ajax), etc. That it makes it a bit easier to find the transaction. They used to have that in Chrome devtools but it seems to be gone or I can’t make it appear or something, which is annoying. Anyway, once you find the xhr transaction (which is a POST, just done via XmlHttpRequest) then you can click on it and look at the parameters and variables that were sent and the response and stuff. The response should be plain JSON, but in yours there is a PHP error message jammed in front of it. I should have realized immediately that that shouldn’t be there, but I guess my brain wasn’t fully engaged and I went chasing the actual cause of the message without realizing that it was just a warning & the warning itself was what was breaking things for you. I’ve seen that 3 or 4 or 5 times, but somehow still forget sometimes.

    I assume you aware of the Developer Tools stuff, but I put extra detail above just in case you aren’t or for anyone else who has nothing better to do than read long rambling support comments πŸ˜‰ Good luck! — Dylan

    ATTENTION EVERYONE– please do not start any more new problems in this ticket – open a new one instead. This one has too many replies and is getting confusing.

    If you are updating a problem that you already detailed in this thread then go ahead and update here, but otherwise start a new thread please.

    olej891 – good to hear, you’re welcome.

    nate.taylor – ah, I think the fact that you have PHP errors set to display to the screen is actually the problem. Go into your php.ini and change it so that they go to a file rather than the screen and then try again. Alternatively, change it so that notices & warnings do not go to the screen. That message I put in the previous update begins “Notice:”, so it’s probably not a fatal error. However, the fact that it’s being printed is causing it to go into the JSON ajax response, which makes it corrupted as far as the javascript is concerned (it can’t parse it). EBD may generate some warnings and such and even SQL errors that can essentially be ignored. If you don’t want to turn off screen warnings in php.ini then you could edit email-before-download.php and download.php and turn it off at the top of each, though, really, for security you should probably log to a file rather to the screen anyway once you have a live public website.

    Hi, I tried your site and experienced the same problem with Chrome but Firefox worked as you said. Chrome has its own built-in PDF viewer, which may be the problem (or may not).

    I am using Chrome on a Mac. I attempted to try it from Chrome on Windows, but couldn’t get my Windows 7 virtual machine to start. Are you Windows or Mac or ?

    If you go into Download Monitor where your Downloads are, you will see the PDF file that you uploaded. You can pull it up so you get like a detail page of info about it in Download Monitor. Look at the top right area of the page and there will be a URL there. That URL is the URL that directly accesses your file via Download Monitor (Email Before Download is not involved). Try that and see if that works (and/or post the URL back in here so I can try too).

    Another thought — go to someone else’s website and download some PDF from them. Then, try adding that PDF and change your shortcode so that it has its ID. The idea here is to try a PDF we know should work, rather than one you have made. If possible, make it a short PDF — only a few pages.

    It’s possible that this is a bug with Chrome’s pdf viewer or some interaction between it and your webserver or EBD or Download Monitor, etc. It’s difficult to say at this point.

    olej891 your form is not being submitted using ajax and is instead doing a normal form POST (non-ajax).

    Contact Form 7 is what handles the ajax part, so your problem probably has to do with that. I suggest you review this page:
    http://contactform7.com/why-isnt-my-ajax-contact-form-working-correctly/

    Most likely your theme does not have the wp-footer or whatever that they are referring to and that is what is preventing the ajax from working (or it could be one of the other issues they list on there).

    There is a slight chance that it is because you named one of the fields on your form “your-message”. I don’t think that’s a problem, but it might be. If nothing else works you might try changing that field from your-message to the-message or something like that. But, most likely, it is one of the problems listed on that CF7 ajax help page that I mentioned.

    nate.taylor your program is throwing the following error:

    Notice: Undefined index: ebd_downloads in /sharedstorage/sites/archantdialogue.co.uk/ht_docs/dia_wp/wp-content/plugins/email-before-download/email-before-download.php on line 432

    I think that might be happening because you have used the code for checkboxes in your form that you set up in Contact Form 7. I’m not sure about that, but I think that’s what is happening. Assuming you are doing a single file download then you don’t need to have the ebd or ebd_left code in your form and you should take it out if it’s in there.

    Make a public test page and put the URL in here so I can try it. Also, post your shortcode.

    You might to make your test file download a .jpg file and not a .pdf or any other extension that might require a plugin to view.

    Please read both of my comments about how the email stuff works: https://wordpress.org/support/topic/sent-email-doesnt-contain-a-download-link?replies=5

    I took a closer look at the PHP code and I think exporting the log should work for non-English languages like Turkish as long as the encoding is set correctly (UTF8) in mysql and in your connection to the database. There are a lot of areas where this stuff can be wrong, so debugging is pretty difficult.

    My guess is that the file is exporting properly, but the program you are using to view the file does not know that its contents is UTF8 (UTF8 is the encoding needed for most non-English languages).

    We can check that by you trying the following. First, rename the exported log file so that it ends with .txt instead of .csv. Next, use Google Chrome and do a File / Open File and select that .txt file off your hard drive (to be clear, you are loading the file into Google Chrome, you are not going to a webpage). Ok, now you should see the log file contents in Chrome and it may still look like it did before, or it may look right. Assuming it still looks messed up with the weird characters and stuff, then choose View then Encoding from the Chrome menu and I’m guessing it will have a checkmark next to “Western”. Try selecting “Unicode (UTF-8)” and see if the text in your Chrome window suddenly looks right. If so, then everything is correct and the problem is simply that you were looking at the file using a program that didn’t realize the file was UTF-8 encoded.

    So, do the above and report back. Also, answer the following questions:

    1. What operating system are you using?
    2. What program were you using to view the .csv file (maybe Excel or a text editor or Word or something like that)?

    Advansys – ok, I couldn’t recall if you were ‘inline’ only or ‘both’. Well, hmmm. I’ve looked through the php and I don’t see how making it “your-email” would matter if you were ‘inline’, but perhaps it does now somehow in WP 4.4.

    What I was trying to get at earlier that you found confusing (well part of the confusing part, heh), is that you had an update above where you said you -thought- you were using the default contact form, but turns out you weren’t, then you made a new contact form and things started working. That update is followed by another update where you mention after much testing you think it is related to “your-email”. While that could be, what I was wondering is if it was really the new contact form that you made (regardless of the your-email field name) and the new contact form “fixed” things for you by preventing it from using old leftover data in the database. However, that doesn’t appear to be the case if you’re saying you can follow the numbered steps you just laid out and that’s what happens (since in those steps it says it doesn’t work with a new contact form unless it’s “your-email”).

    Anyway, it’s good that you have a procedure that works for you and perhaps for anyone else in your spot. M&S might spot something I missed about “your-email”, but as far as I can tell it shouldn’t matter for “inline” (though, maybe something changed in WP 4.4 that made it make a difference)….

    ps – You did check for php error log files right? Usually named “error_log” and they get dropped in various directories in your WP install typically (unless the php config was changed). The blank screen kind of sounds like a php program erroring and aborting .. maybe it dropped a msg in the error_log. Wait, nevermind, I just remembered you mentioned an error out of the error_log early on so clearly you’re looking in those. Ok, well, who knows… I’m just glad you got it working. Good luck!

Viewing 15 replies - 541 through 555 (of 777 total)