dtynan
Forum Replies Created
-
Forum: Plugins
In reply to: [Email Before Download] Can’t export emails from logUse the export CSV link from the top of the EBD Settings page rather than from Download Monitor.
Forum: Plugins
In reply to: [Email Before Download] No inline link, no email. Just loading in loop.Hi, yeah still the same problem. So, when I press submit on your form, this is the response that comes back:
<br /> <b>Notice</b>: Undefined index: ebd_downloads in <b>/home/insidesc/public_html/wp-content/plugins/email-before-download/email-before-download.php</b> on line <b>432</b><br /> {"mailSent":true,"into":"#wpcf7-f32037-p32091-o1","captcha":null,"message":"Grazie! Puoi scaricare la brochure dal seguente link: http:\/\/www.insidescience.net\/wp-content\/uploads\/2016\/10\/Workshop-HRV-BFB-2016-seconda-edizione.pdf","onSentOk":["document.getElementById('wpm_download_4').style.display = 'inline'; document.getElementById('wpm_download_4').innerHTML='The link to the file(s) has been emailed to you.'; "]}That first part, the HTML stuff, shouldn’t be there. It should just start with the {“mailSent” section and all the stuff after that. That part is JSON. The stuff before it is HTML. The javascript code that executes when you press the Submit button expects to get back just the JSON part. So, as I said previously, what’s happening is that that Notice warning message is getting in there too and messing it up.
As a side note, I don’t know if you know how to use Firebug (in Firefox) or Developer Tools (in Chrome), but if you do, all I’m doing to see that is going to your page, then I bring up Firebug or Developer Tools and I put it on the “Network” tab and then I fill in the form on your page and hit submit, and then you can see that transaction happen in Firebug or Developer Tools and if you click on it and go to the “Response” tab you’ll see the exact stuff above that I pasted in.
So, getting back to the actual problem, you have to figure out how to turn that notice off. Aside from WP_DEBUG (which is a WordPress setting), PHP has its own settings for that stuff. I think the PHP one will still work even if WP_DEBUG is off, so perhaps that’s what is causing the issue. You need to find php.ini and edit it and look for display_errors and turn it off or make it go to a file. There can be multiple php.ini files, which makes this kinda tough sometimes. If you’re on a 3rd party hosting site, then their support can probably help you (or it might be on the menu/control panel that they give you).
Hmm. You could do this if you wanted to. You could just edit the Email Before Download php files themselves and put in a couple of commands at the top to make sure WP_DEBUG is off and PHP is not displaying errors. That’s not the best long-term solution since your changes will get overwritten if you ever upgrade the plugin, but it should at least solve the problem for now. To do that, I would edit email-before-download.php and put
define( ‘WP_DEBUG’, false );
at the top just after the first line (before the comment but after the php command) and then try it. If it still doesn’t work, then add:
ini_set(‘display_errors’, ‘0’);
and try againBe sure to update this and let me know if you get it working and what happened
Forum: Plugins
In reply to: [Email Before Download] Can’t get multiple downloads to workBecause of your shortcode you are actually only using Contact Form 7 — you are not actually using Email Before Download. I assume that was also the case when you were doing single-file download. An EBD shortcode looks something like
[email-download download_id=”372″ contact_form_id=”482″]
That download_id value is the ID value of the file you added to Download Monitor (the file that will be downloaded by the website visitor). The contact_form_id is the ID value of the form that you created in CF7.It can be a little tricky to get things working correctly — that’s especially true if you’re doing ’email’ or ‘both’ (rather than ‘inline’) in the EBD settings. Getting email delivered often has problems.
I suggest you closely read the FAQ page (https://wordpress.org/plugins/email-before-download/faq/) and look very closely at the Screenshots (https://wordpress.org/plugins/email-before-download/screenshots/). Aside from using the wrong shortcode, what you added for multi-file download is incorrect. You did [ebd /], but those square brackets are supposed to be angle brackets <ebd />
Once you’re restudied that stuff, then get rid of the [ebd /] code in your form. Don’t put in the correct one yet though — you really want to get it working properly for single file before you try multi. So, next, fix your shortcode so that is the email-download style shortcode. Next, if you’re changed any of the defaults in the EBD settings page you might want to put them back. Also, I suspect perhaps you’ve hardcoded a link to the download file into the CF7 form ’email’ tab. If you have done that, that’s wrong, get rid of it. The email sent from CF7 is a notification email to you — it does not go to the guy who filled in the form when he visits your website.
So, do all that, then post back in here with a link to your page & also list the version numbers of the 3 plugins you installed (Download Monitor, Contact Form 7, and Email Before Download).
Forum: Plugins
In reply to: [Email Before Download] Success message is not showingMost of the time this is caused by having WP_DEBUG turned on and allowing the messages to go to the screen rather than to a file.
When the user hits submit on the form it does an ajax POST and it expects to get back some JSON. If you have WP_DEBUG on and you don’t have it set to make the debug messages go to a file, then a warning will happen and it will get mixed in with that JSON and corrupt it so that it is not in the correct format, which causes the page to hang.
So, you just need to turn WP_DEBUG off. Most likely you have it turned on in wp-config.php. Or, possibly in index.php. Here’s some info on debug settings and such for reference: https://codex.wordpress.org/Debugging_in_WordPress
Forum: Plugins
In reply to: [Email Before Download] CSV files does not contain details of downloadsProblem 1:
Looks like maybe you’re not using the correct shortcode. Your shortcode needs to have a download_id=”5″ (replace 5 with whatever the id is of your download file in Download Monitor). I’m not sure if you’ve left that out of your shortcode or if maybe you’re using a CF7 shortcode rather than an EBD shortcode. Your shortcode needs to look something like:
[email-download download_id="425" contact_form_id="488"]That downnload_id is associated with your download file in Download Monitor and the contact_form_id is associated with the form you made in Contact Form 7. See the screenshots page and the FAQ page for more info/examples. Once that is fixed, it will start logging properly into the CSV file.
Problem 2:
It looks like you have hardcoded a link to the download file in the email that gets sent out to the user. You don’t need to do that. Once you fix Problem 1 then EBD will be working correctly and the email that gets sent will automatically have a link to the download. Or, if you put your own text into the email template setting (I think it’s item 9.1 in the EBD settings), which it looks like you want to do, then rather than putting the URL of the pdf file in the a href link you have in there, you should put [file_url] instead (see the help text underneath item 9.1). Then when the email is sent out, [file_url] will be replaced with the URL to the download. That URL will be a link to the email-before-download/download.php program with a big long string of characters on the end. When people click that, the download.php will give them the download file associated with the download_id that you put in your shortcode. The reason for all of this is so that A) it gets logged and you can download it in the CSV file and B) the end user gets a link that is somewhat obscured, making it less likely that they’ll share it with other people (thus making it more likely that others will go through the signup form rather than just going directly to the link that someone told them about) and C) you have the option of expiring the download link after some set period of time.
Problem 3:
When I tested your page using one of my test gmail.com addresses, the email that came to me went into my spam folder. You probably need to change the From: of the email so that it is not the default. There is no way in EBD to change the From: (this is for the email sent by EBD, NOT the email sent by CF7 which you can change the From: on). So, in order to change the From:, you need to either install the plugin Custom Sender For Email Before Download, which will let you set the From: value. Or, what more people tend to do, is to install Postman SMTP, which will let you do that and gives you other goodies like a log of what happens when an email is sent (helpful if you think your email might not be going out).
Forum: Plugins
In reply to: [Email Before Download] Object Moved ErrorIt looks like maybe you have changed your page to use a non-Contact-Form-7 form that POSTs to a non-EBD php program (process.php) in order to get things working? Is that right? That’s my best guess from looking at your page & trying it. It looks like you have the plugins installed but aren’t using a couple of them, so I suspect that’s what you did.
As to the original problem that you ran into, it’s difficult to say without being able to see what you had before. If you want to put it back like it was I can take a look. Or, you can just try these couple of things to see:
1. make sure the CF7 form you’re using has a field name of “your-email”. It must be that. That is the only thing that has been an issue for people upgrading from old versions of the plugins (note that it was always supposed to be “your-email” and is documented that way, but somehow it used to work even if you didn’t name it that [if you were doing inline link]).
2. remove your download from download monitor and then reupload it. You want to get a new download_id. Then, do a “Duplicate” of your CF7 form (so you have a form with a new contact_form_id). Then, get rid of your existing EBD shortcode and replace it with a new one that has the new download_id and the new contact_form_id.
3. try checking and unchecking the “hide/mask” option in the EBD settings (and testing after each way). If it is unchecked it will try to do a 302 Location to the browser (which might result in an Object Moved error if the download file wasn’t where it thought it should be [which should get fixed when you do #2 above). If it is checked then it will try to read the file using php and send it to the browser.
fyi – One of the points of EBD is to give the user a download URL that is not easily memorizable and that can be expired. That is where the URL with the download.php?aBunchOfCharacters URL comes from. The point being not to give users a /download/2321 link, which they could easily share with friends and get to the download without filling out the form.
Forum: Plugins
In reply to: [Email Before Download] Email won't sendgednav, please do not update old items — please pen a new item instead and put the problem you’re having into the new item
(wordpress.org has changed it so it sorts support items by the original date it was opened rather than the last update, so it’s very unlikely that I’ll see updates on old existing items).
Forum: Plugins
In reply to: [Email Before Download] Big error log file! (21GB)It doesn’t create any error log files. If you have WP_DEBUG turned on (and configured to go to a file) then it will log messages — notices, warnings, and errors. That could be what you’re seeing.
It might also happen if you have php.ini configured to log all that stuff to a file.
21GB sounds like an awful big file though. Exactly what file are you talking about (what is the name & location of said file)? Did you look in it to see what kinds of errors are in there?
Forum: Plugins
In reply to: [Email Before Download] CSV files does not contain details of downloadsMake sure you are using the download CSV link at the top of the EBD Settings page in your WordPress admin screens (not the one from the Download Monitor area of the admin screens).
Forum: Plugins
In reply to: [Email Before Download] No inline link, no email. Just loading in loop.Ok I checked your page and the problem is what I suspected — there is a “notice” message about an undefined index and that message is getting combined with the ajax response and hanging everything. The content of the notice message is not important, but the fact that it is getting mixed into the ajax response is a problem.
So, I did a little reading to refresh my memory on how this stuff works. I read this page:
https://codex.wordpress.org/Debugging_in_WordPressIn there it says that if WP_DEBUG is ‘on’ then it will make all the PHP errors, warnings, and notices start showing up. They will basically go to the screen (get mixed in with the html and stuff) unless you make them go to a file.
So, as you can see, you either need to turn WP_DEBUG off entirely, or you need to at least turn WP_DEBUG_DISPLAY off (and then you could turn WP_DEBUG_LOG on if you wanted to log those errors/warnings/notices to the error file (“debug.log”).
WP_DEBUG is probably getting turned on in the wp-config.php file in your main wordpress directory (or possibly in the index.php file in that same directory). You need to edit wp-config.php and find the line where it is turned on and change it to off. Or, leave it on but add a line to turn WP_DEBUG_DISPLAY off (and possibly another line to turn WP_DEBUG_LOG on if you want that stuff to a file).
You will need to be able to access your main WordPress directory to do this stuff. Normally people do that by using a text editor and editing those files on the server or maybe they edit them locally and ftp them up to the server or something along those lines.
ps – you can ignore the PHP-land stuff from my prior update .. you just need to set/change those wordpress debug settings to fix this.
Forum: Plugins
In reply to: [Email Before Download] No inline link, no email. Just loading in loop.Hi — as a new wordpress user I’m surprised you got as far as you did really. Lots of brand new folks download “Download Manager” by mistake rather than “Download Monitor” 🙂
I appreciate the fact that you looked back through old issues to try and fix this yourself. I’ll give you one of my patented long explanations as a thanks 🙂
So, the problem is very likely that you have warnings/errors going to the screen rather than to a file. In PHP-land, that stuff is controlled by settings in your php.ini file (and you can have multiple ones of those .. sometimes one for Apache and one for php from the command line, etc). It can get a little complicated. Anyway, in that file there are some settings that tell PHP whether or not to spit out warnings, errors, or only critical stuff and then also where to spit it .. out to the display (or whatever started the program) or to a file. So, you might have that stuff set to go to the display rather than to a file. But, that’s PHP-land.
In WordPress-land, I think that stuff is controlled by WordPress settings (though it might be controlled at both levels .. I’ve never really bothered to figure it out all the way). Anyway, in WordPress-land, turning on WP_DEBUG is how you normally debug stuff. USUALLY that is turned on or off in the index.php file in your wordpress directory. IF it’s ON then errors and/or warnings are going to go somewhere. I think they’ll end up going to the screen if php.ini says so … or, there is also a WordPress settings that controls that as well (called display_errors). See this post from someone that talks about this stuff better than I’m doing: https://aristath.github.io/blog/wp-hide-php-errors
The reason this is a problem is that EBD sends back an AJAX response when the website visitor hits the submit button. That response is JSON. If display errors is on, then there is a warning that happens then and that warning text gets mushed into the JSON and corrupts it and everything hangs. Turning off display of errors/warnings is the easiest way to fix it. A perhaps better way is to make all your errors/warnings go to a file somewhere by setting that stuff in php.ini. That’s what I do … that way I can still see that stuff, but I never accidentally poop out a bunch of errors to some website visitor who went to a wordpress page on my site that had a problem. But, either way, the main thing is to stop those messages, which should fix the issue that you’re seeing.
If it doesn’t fix it, post a URL so I can go try your site.
ps – The Description page for EBD states that you have to use that old version of Download Monitor and it gives you a link to it. That is not actually the case. You can use the latest version of Download Monitor. The advantage of using the latest DM is that EBD will generate far fewer warnings and errors (the older DM works .. you’ll just see scary-looking warnings & error msgs in the log [assuming you make that stuff go to a file]. You can ignore those errors/warnings .. they don’t really matter, but they are unsettling). If you have the old DM right now, you can just remove it and then install the latest one and then re-upload your file into it. Note that the new DM works/looks quite a bit different when you go to add/upload a file .. it looks like you’re making a post or page in wordpress .. takes a bit of getting used to .. see DM documentation if you get confused).
Forum: Plugins
In reply to: [Email Before Download] Wrong emails being sentsprad001 — please open a new item and put your description into the new item. Also, please include a link to your page so I can try it. Do not update this item further or I won’t see it…
(wordpress.org now sorts the support items by the datetime they were opened rather than the last update, so when you update old items like this I usually miss the updates now .. just happened to run across this one by chance)
Forum: Plugins
In reply to: [Email Before Download] attachment feature not working ?You should be getting 2 emails.
One email is what I call the notification email. That one goes to the To: address in the CF7 form that you made (usually that is set to your wordpress admin email address, unless you changed it). That one is just to tell you that a visitor came to the site, filled in the form, and was sent an email (or given a link on the page or whatever).
The other email is the one that goes to the email address that the website visitor typed into the form that was displayed to them on your page. This could be any email address. If things are working correctly, then it will send an email to that address and that email will have a link to the download or an attachment (or both). It is a common problem for this email to not arrive because it gets blocked by the email provider (like Yahoo Mail for example).
So, for you to test your setup, you need to make sure you are getting both emails. Thus, when you go to your page as if you were some random person on the internet, make sure you put in a test email address —- NOT the same one you are using as your wordpress admin email address. Then, submit, and see if you get an email to that address and another email to your wordpress admin email address (or whatever you set it to when you made the CF7 form).
Update this w/results of your test etc
Forum: Plugins
In reply to: [Email Before Download] E-Mail Before Download Plugin Download url 404 ErrorWhen I try going to http://www.open-silicon.com/wp-content/plugins/checkcurl.php I get a 404. I get a 404 for any php file I try to access in that directory. I was able to pull up the readme.txt in that directory. Kind of looks like some sort of webserver-related configuration problem on your end .. or perhaps a security plugin blocking access to php files or something?
Forum: Plugins
In reply to: [Email Before Download] can’t email more than one file at onceThe only way to do multiple files is to make it display checkboxes (one checkbox for each file). You designate which files by using multiple download_id values in your EBD shortcode. So your shortcode might have something like download_id=”122,153,86″ or something like that. That is how you specify which files from Download Monitor. In Download Monitor itself, you do not multiple URL in the download detail page like you are doing.
And you need to use either <ebd /> or <ebd_left /> in your CF7 form (note that there is space before the slash in those codes). ebd_left is for checkboxes to appear on the left side (which usually looks better). See the last screenshot on the screenshots page for an example if this is confusing.
In your case, because you are only emailing attachments, it might seem like you should be able to just do multiple files like you are trying to do, but you have to realize that in most configurations, EBD is displaying the Title of the file to the user as a link they can click on the page (‘inline’) or in the email (’email’). The only time that doesn’t happen if you do email with attachments and you change the text of the email to not have any links in it. Thus, EBD sort of wants a 1-to-1 relationship between things on the screen and things you download. That’s why to do multiple files you must do checkboxes. That will mean the user can see file titles for both of the files you want to send on the screen and then he can either check or uncheck the checkbox next to each one (which will then control which ones [or both] are attached to the email that is sent). You can default the checkboxes to checked, but he can still uncheck them if he wanted to.
That’s the only way to do it…I think .. (you could TRY not putting in the <ebd /> or <ebd_left /> codes and just putting two download id’s in the download_id=”” part of your shortcode and see if it works. I’m pretty sure it won’t, but I haven’t actually tried that, so as a quick test you could do that before you convert over to checkboxes … maybe it’ll magically attach both to the email [though I doubt it])