-
Search Results
-
Hi there,
I guess I’ve found a problem in your code, regarding JavaScript redirect after downloading single file from files package.
The problem exists in line
347ofclass.FileList.phpwhere you add a<script>tag with click event for the Download button.Let’s take a look at your piece of code:
jQuery('.inddl').click(function() { var tis = this; jQuery.post('https://someexampleurl.com', { wpdmfileid: '1234', wpdmfile: jQuery(this).attr('file'), actioninddlpvr: 1, filepass: jQuery(jQuery(this).attr('pass')).val() }, function(res) { res = res.split('|'); var ret = res[1]; if (ret == 'error') jQuery(jQuery(tis).attr('pass')).addClass('input-error'); if (ret == 'ok') location.href = jQuery(tis).attr('rel') + '&_wpdmkey=' + res[2]; }); });This is the piece of code that contains an issue:
if (ret == 'ok') location.href = jQuery(tis).attr('rel') + '&_wpdmkey=' + res[2];jQuery(tis).attr('rel')takesrelattribute value and appends it to current url, so if my package is athttps://someexampleurl.com/download/packageand I click the download button which hasrel="nofollow"attribute, I am redirected to:
https://someexampleurl.com/download/package/nofollow&_wpdmkey=WPDMKEYwhich gives me a 404 page.As you can see,
?rel=is missing in your code where you overridelocation.hrefand that redirects to non existing page. You don’t even check whether there is any query variable in the URL or not, which may lead to something like this:https://someexampleurl.com/&_wpdmkey=WPDMKEY.Also, if you try to download the file while being connected to slow network, it doesn’t fire the
save file dialogeverytime, redirect is fired earlier instead.I will fix it on my own, but future update will override my fixes. That’s why I’m posting the issue here. I hope you will fix it as soon as possible.
Topic: URL to overview
Hi
I’m new with wpdownloadmanager (Former Joomla developer and use to use DOCman). In DOCman you can get a list view with all documents that can be downloaded (see http://www.ekvstolar.se/ladda-ner).
But how do I do that in WPDM???
I have followed the instruction here https://www.wpdownloadmanager.com/doc/settings/basic-settings/ and change the base url (https://imgur.com/reY6jAd) but it doesn’t work: http://195.238.77.215/~kavlingelarcen/laddaner/instruktionerWhat’s wrong?
Topic: Filename
After updating the download manager the filenames changed. after downloading a file the wpdml changes the original filename and adds the url in front of it. how can i change this
How do I upload download manager records from css using the CSV Import Add-on when. the records point to a url not a specific file. I could not find a field to map the url to. I tried mapping it to the wpm:files field but this did not work.
Search Results for 'Add Url'
Manage your purchases, downloads, and account settings
