dtynan
Forum Replies Created
-
Forum: Plugins
In reply to: [Email Before Download] The download link is not showingThat means the problem is not with Email Before Download.
The problem is one of the following:
-
something wrong with your file (like it is zero bytes long)
something wrong with your Download Monitor setup
some other wordpress plugin or theme messing things up
something wrong with your webserver configIf you don’t have any ideas of what might be the problem, then I suggest the following:
remove Email Before Download and Download Monitor plugins
if you weren’t already using Contact Form 7 then remove that too .. otherwise leave it
install the latest version of the Download Monitor plugin
make a test file to upload — make sure it is a NEW filename that you have NEVER used before and make it be a .jpg or .png file (do NOT use pdf files).
in your wordpress admin menus, go into Download Monitor and Upload that file that you just made.
once you have uploaded it successfully, look at your list of files in Download Monitor and make sure it is there and then click “Edit” and look at the top right area of the screen for the URL for that file.
copy and paste that url into a browser and hit enter
the save box should appear, click save and see if it will save
if it saves, then you can go install Email Before Download
if it does not save then you know for sure that the problem is with your webserver configuration or with some other plugin interfering or there is some sort of weird permissions problem (though I can’t think of one that would cause that).Assuming it doesn’t save, then you need to talk to someone technical who understands your webserver setup. You are not using Apache, so I don’t really know what could be wrong on the webserver part.
Again, if you haven’t disabled your other plugins & tried it, then that’s a big troubleshooting step you need to try.
You could also go post on the Download Monitor support forum and see if they can help you, though it is pretty clear this is a problem with your setup / your environment and not a problem with their plugin, so they may not help, I don’t know…
Forum: Plugins
In reply to: [Email Before Download] The download link is not showingGo look at your downloads (the files you have uploaded into Dowonload Monitor). Click Edit on one of them so that you are looking at it’s detail page. In the upper right of the screen there is a section titled “Download Information”. It has 3 fields — ID, URL, and Shortcode. Grab the entire value of the URL field. Put that in a browser and see if you can completely download one of your files (put it in a browser, hit enter, it should pop up a file save box, click Save and see if really saves the file [I suspect you’ll get a network error in the lower left of the browser & you won’t actually save the file]).
Post back in here & tell me what happened. Include the URL that you tried.
Forum: Plugins
In reply to: [Email Before Download] How to style "success message" (remove green box)?You might try setting the border color on
div.wpcf7-mail-sent-okthat might do it.
I’m not exactly sure how to do it, but here are a couple of things you could try:
if you’re NOT doing multiple downloads (checkboxes), then you could try putting some css that was something like:
#wpm_download_X { display: none !important; }where I have an “X” in there you’d need to change that X to be the number of your download file (the download_id number that you are putting in your shortcode).
If you ARE doing multiple downloads (checkboxes), then you could try putting a zero or a one where the X is. I’m not sure if that would work, but easy to try. I’ve made modifications to my setup, so I don’t know if it would work for you or not, but for me it would be aa zero, like:
#wpm_download_0 { display: none !important; }I haven’t tried any of that, so it might not work. If it doesn’t, I suggest you pay the $10 for support to the M&S Consulting guys (the author of the plugin).
Oh, by the way, you could also look in the database to see what’s happening. The table where the email address is stored will be called something like “edb_link” or “wp_edb_link” or something ending in “ebd_link”.
I believe the way it works is that when a user fills in his data into the form & presses Submit a row will be added to that table (or possibly multiple rows added, one for each checked file). I think that at this point, if you were to look at that ebd_link table in the database, you would see a new row (or possibly multiple rows) that would have the email address in the ’email’ field and I think there’s a field called “is_downloaded” or something like that and it will probably be zero. So at this point, the user will see the inline links appear on his screen since he has pressed the Submit button. Now when the user clicks on one of the links to download the file it should update the row for that particular file in that ebd_link table & change the is_downloaded field (or whatever it’s called) to a 1. It should not blank out the email field and I don’t think it does, but you could check that…
I think the issue has to do with the multiple checkboxes … I think it does something like adds rows for each download but only puts the email in one row & not any others & that’s why it doesn’t export in the log. Or, maybe it only puts in 1 row in the table & all the download_ids for every checked checkbox or in a single field separated by semicolons. Sorry, I just don’t remember exactly and I think it might change depending on whether you are old Dowload Monitor or new Download Monitor.
Anyway, that can give you some things to go check out & see what you find.
That works for me, but I have made a number of modifications to mine and it’s possible one of them was to fix that issue (I don’t really remember for sure).
I do have a foggy memory that maybe there was a problem when you are doing multiple downloads (the checkbox stuff) and maybe in combination with doing ‘inline’. Can’t say for sure though. I don’t have a test setup to test it or else I’d try it real quick and see.
Are you doing multiple downloads (checkboxes) ?
Does your form use the form field name “your-email” for the email input? It must be “your-email” and the name must be “your-name” for it to work right. This is the html form field name I’m talking about (of the form you set up in CF7)
Are you doing inline, email, or both ? (you might try both and see if it starts logging email)
Are you on the latest Download Monitor version ?
Assuming you are doing multiple downloads, you are using “your-email”, trying “both” or “email” doesn’t solve it, and you are on the latest version of Download Monitor, then I think it must have been a bug that I made modifications in mine to fix. So, unless you’re a programmer, you’re probably out of luck, though you might paying the $10 to the M&S Consulting guys, maybe they can help…
Also, if I remember this issue correctly, then I think the “email” field in the CSV export is blank, but the “posted data” field has a bunch of XML in it and inside that will be the user’s email address. So, in other words, even though the “email” field is blank in the CSV export, I think the data might still be there in that “posted data” field (or whatever it’s called) and you could parse it out of there or view it in there or whatever .. it’s just harder to see cuz it’s mixed in with other xml poop.
Forum: Plugins
In reply to: [Email Before Download] Anyway to determine which files have been selecetedIt should list the file titles in the notification email (the CF7 email) to the administrator. Note that it is the titles, not the file names. The file titles come from Download Monitor (you set them when you upload the file).
In that notification email to the admin, it should say “The downloaded file name(s):”
then after that will be each file title that the user checked on your form (and then hit submit). The file titles will be separated by a vertical bar, all on one line.The code for this happens around line 631 of email-before-download.php, where you will see something like this:
$mail['body'] = str_replace("[your-message]", 'The downloaded file name(s): ' . $title, $mbody);I didn’t like having the vertical bar in there & everything on one line, so I changed that line to the following so it looked better in the email (you don’t need to do this, I’m just pointing it out):
$mail['body'] = str_replace("[your-message]", 'The downloaded file name(s): ' . "\n" . str_replace("|","\r\n",$title), $mbody);I’m not certain what it is that you’re seeing in your email, so I don’t really know what the problem could be. My guess is that either you have some weird or missing file titles for some of your uploaded files, or perhaps it’s an issue with whether the sent email is plain text or html (I don’t recall how that works exactly .. I think there’s an option in the CF7 settings you set up for the email .. try changing it to the opposite of whatever you’re using currently and try again).
Forum: Plugins
In reply to: [Email Before Download] use as template functionI’m not quite sure exactly what you mean by template page — based on the description, I’m assuming it’s a dynamically created page via your theme or some plugin where you define the layout in advance in a template or maybe in a settings page or something like that. If that’s the case, then yeah it’s not gonna work. EBD is based off that shortcode. If you look around line 111 of email-before-download.php you’ll see a function where it parses the shortcode for the attributes and continues from there. And, beyond that, at some point it will do a string replace into the contents of the wordpress page (putting in the download link or whatever). Plus, there’s some ajax that happens in there too. I think it would be quite difficult to make it work “inside” some other plugin or special template or page or dynamic page type thing.
Forum: Plugins
In reply to: [Email Before Download] The download link is not showingOk, I looked over both of your pages. I see a few odd things (on both pages).
Let me start with a question first — are you set to “both” or to “inline”? I did not receive an email from either page, so if you are set to “both” then it’s not working for the delivery of the email to the end user (though you may be receiving the “notification email”, which is the email that goes to the admin user and tells you what someone downloaded).
For both pages, I immediately see an odd thing in that both pages when they first load (before the end user has even seen the page) issue an ajax get, which is not right. It looks related to Contact Form 7 because it has some CF7 variables. It gets back an empty data set (an empty array). That doesn’t seem to affect the initial page load since everything looks ok after that, but it does tell me that you have some plugin or javascript that is interfering with your ajax stuff somehow or with your forms .. it may not be enough to break things, since things generally seem to do ajax OK after that point, but it’s suspicious.
Looking at the page that you said works ok, I can fill in the form and press Submit and it looks good at that point. A link appears with the text “Link Smart Update – Social Contributions for 2015” and the URL associated with that is http://www.smartree.com/wp-content/plugins/email-before-download/download.php?dl=c8dcfafd130b0b681596d0a5a988e06d If I click that link, it does a 302 redirect to this URL, which is the Download Monitor URL for your file: http://www.smartree.com/download/5892/ Going to that URL will pop up a download box in Google Chrome and it will be filled in with the filename Smart-Update-Cote-contributii-2015.pdf. If I click the Save button, then it fails to save it and says something about a Network Error. So, that tells me that even if we are dealing with just your Download Monitor set up and your files (completely outside of EBD), then it is not working correctly. If you look at each file in Download Monitor, in the detail area, you’ll see a URL for the file (it’s kind of in the top right area of the screen). You should be able to take that URL and put it in a browser and download the file, but that is not working for your site. So, I suspect that that file is missing off your filesystem, or it’s 0 bytes in length, or it can’t be read because of permissions, or the path is wrong, or one of your plugins is interfering, or you have some weird redirects or misconfiguration in your Litespeed setup or other proxy or caching or webserver or load balancer. Until you fix this, nothing is going to work I suspect.
Over on the other page, the one that doesn’t even show the link, the issue there is that the download id is not getting set right. This is probably a mistake in your shortcode. So, what happens is that when you press Submit button, a bunch of variables get passed on to the server. One of those is called _wpcf7_download_id and it is created from the download_id value of the shortcode. In your form that works mostly, it is filled in with a value of 20. On this form, it is empty. So, on this form, you are missing the download_id or have a syntax error in your shortcode or there is a problem in the Download Monitor part where the file associated with that download_id is really messed up or something. The fact that you are multilingual may be an issue — I’m fairly certain that filenames (on the filesystem itself) or file titles (in download monitor) with any kind of non-English character can cause problems (like things with an accent mark).
Forum: Plugins
In reply to: [Email Before Download] How to add a 2nd email template in another languagethere is no way to do that as far as I know.
There are a couple of multilingual wordpress plugins that work by basically creating 2 sites and then routing the user to one or the other. Obviously, in that case, you could do it because you would really have 2 wordpress sites and 2 instances of the plugins.
Other WordPress multilingual plugins work by creating 2 sets of content (pages, posts). Those probably aren’t going to work very well because you still only have 1 set of plugins, so you only have the ability to set one set of stuff in either English or Russian.
If you have a programmer available to you and your site is set up where you can only have 1 set of plugins, then I think your best bet is to have your programmer put in some custom javascript that fires once the page is loaded & it replaces the English content in your divs (in your template) with Russian. That won’t be very easy to do, but it’s possible. Alternatively, you could directly edit the email-download.php file & try and jam the other version of your content in there (that would be ugly, but probably faster to do). In either case, you’re going to need a decent programmer & you’re going to end up with a pretty custom solution. EBD doesn’t go to new versions very often, so directly editing the plugin isn’t as bad as it sounds really (I have all kinds of edits in mine). Good luck.
Forum: Plugins
In reply to: [Email Before Download] Checkbox non coché et envoi du formulairede rien
Forum: Plugins
In reply to: [Email Before Download] Checkbox non coché et envoi du formulaireI have quite a few edits in my email-before-download.php and download.php files and I don’t quite remember why I did some of them or what exactly they do, so this could be completely wrong advice. That said, you can try this and see if it works…
Around line 562 of email-before-download.php, you should see a line like:
else if(!empty($d) || !empty($ebd_item->file) ){try changing that to:
else if($dIds && (!empty($d) || !empty($ebd_item->file)) ){save it and try again. I think it will prevent you from submitting without checking a checkbox now.
Forum: Plugins
In reply to: [Email Before Download] Suddenly stopped working?sounds like the download file got removed maybe? or perhaps you have redirects that are in the way? maybe you installed a plugin recently that messed with things?
My guess would be that the download file is no longer there on the filesystem. Check and see. If that’s not it, remove your download files in Download Monitor, then reupload the files using Download Monitor, then note the IDs of the files and fix your shortcode to match.
Forum: Plugins
In reply to: [Email Before Download] Email Before Download no longer workstry removing the downloads that you uploaded and then uploading them again (remove them in Download MOnitor)
Forum: Plugins
In reply to: [Email Before Download] Fatal error: Class 'downloadable_file' not foundI assume you are using Download Monitor version 3.3.6, is that right?
You set it up for multiple downloads (checkboxes using the ebd or ebd_left codes)?
Are you actually seeing a failure in the way it works, or are you just seeing that error in the error log? (I am assuming you have PHP set to print errors to a file and not to the screen)
In my experience, EBD works with the old 3.3.6 version of Download Monitor that is recommended in the Description page of the plugin, but it logs a bunch of scary SQL errors like the one you’re seeing. That scared me, so I tried the latest version of Download Monitor, which also worked and did not log the scary errors.
That said, at least for me I ran across a couple of weird little gotchas where I ended up modifying the code a little bit, but I think the last time I tried to reproduce those I couldn’t, so I don’t know if they exist in the latest code or if I was fixing something that wasn’t broken or if perhaps I had something weird in the database that was messing it up (having tried multiple versions of Download Monitor and uninstalling & reinstalling plugins several times, no telling what was left in there that might mess it up … or not, who knows). Anyway, that was my experience, so I’m wondering if you’re on 3.3.6 and basically seeing something similar.