Needs work
Project:
Public Download Count
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2010 at 14:14 UTC
Updated:
17 Sep 2018 at 20:17 UTC
Jump to comment: Most recent
Comments
Comment #1
lesleyfernandes commentedSame here, my files are with the correct link eg. name_file(0), and I downloaded and still displaying "No download count records are found for the file."
Comment #2
petermilad commentedWell, I find this issue important to me a little bit
Comment #3
pixture commentedWhen you move the mouse cursor over the file download link, what kind of URL do you see?
It's supposed to have pubdlcnt.php?file=xxxxxxxx&nid=zzzzz. Please let me know the URL.
In addition, make sure that you install PDC module to the standard 3rd party module directory where (drupal-root)/sites/all/modules. If not, PDC module may not work.
Comment #4
vrato commentedPublic download counter doesn't work for me too:-(
When I move the mouse cursor over the file download link, I see this URL.
http://MYSERVER/Drupal/sites/all/modules/pubdlcnt/pubdlcnt.php?file=http...
Clean url and Public download are enabled, but counting is not working. Where could be problem?
I use drupal 6.19.
Comment #5
mikelo commentedI have the same problem after upgrading to CCK 6.x-2.9.
Comment #6
pixture commented> @vrato,
The link URL looks good.
When you click the download link, the file is downloaded but the counter is not implemented. Is that correct?
If so, the possible reasons of not counting are:
1) The file extension is not in the list of supported extensions. In case of your example link, .pdf is the file's extension. Be sure that this file extension is in the list of supported extensions.
2) Somehow, the URL of the target download file can not be verified. When the file is about to be downloaded, PDC module checks if the file URL is valid and the file actually exists or not. If it is determined to not to exists, then it skips updating counter. When the web server does not return expected responses (HTTP/1.1 200 OK or HTTP/1/1 302 Found) when the existence of the file is checked, the PDC module determines that the file does not exist and skip updating the counter. If this is the case, you can skip this existence check by making a minor code change (see below).
Before (pubdlcnt.php)
After (pubdlcnt.php)
Please make this change and see if this fix your issue or not.
Thanks,
Comment #7
aacraig commentedI have the same issue (in 7.x-dev).
The problem is that I have my module installed in the (now standard) contrib/ directory, so my file structure is:
/path/to/drupal/sites/all/modules/contrib/pubdlcnt
If I adjust the code in pubdlcnt.php to the following, the report displays correctly:
Comment #8
Bandy commented#6
That works in 7.x-1.0
Comment #9
sreynen commentedThe contrib issue in #7 is addressed in #1294868: Also check if module is in sites/all/modules/contib/pubdlcnt. That doesn't seem to be the main problem in this issue. #8 suggests the main problem is fixed with #6, so marking this RTBC.
Comment #10
phily@pixture (#6)
THANK YOU! my aspirin box is empty and you saved me ;-)
Comment #11
manoloka commentedHi there,
In #3 you state;
I couldn't find anything within the README file (or anywhere at all) that explains what the link should be, how are we supposed to guess that? as it seems that without that information the module doesn't do what it's supposed to do
Comment #12
parasolx commented#6 solved my problem also...
nice patch
Comment #13
thermador commentedFor what it's worth #6 solved my problem for drupal 7 as well.
This problem started when my host upgraded PHP versions from 5.2 to 5.3, so I think that may be the cause... dunno for sure.
EDIT: I now know EXACTLY what caused this problem for me. When I upgraded from 5.2 to 5.3, I also changed my settings with the host to "remove www." from the URL. Unfortunately, I did not remember to update the $baseurl in Drupal's settings.php to match. Once I did this, Public Download Count worked fine again. And, then I broke it again on purpose to test, and fixed it.
tl;dr: mismatched host's site url vs. drupal's $baseurl is at least one of the possible causes of this bug.
Comment #14
bkudrle commented#7 worked for me. Thanks so much!
Comment #15
roryt2000 commentedI've tried all of the above suggestions, and this module still just doesn't work for me at all.
The download link just shows the direct file URL (not pubdlcnt.php?file=xxxxxxxx&nid=zzzzz), and none of the downloads are tracked.
Comment #16
DanNY commentedHi, not getting the installation and why link to File Download would show location in the module.
I have File Download module installed. In an Article, have a File Download field for adding a file on Article creation. For the visitor, the file link appears and people can download. Files are saved in the default public file folder sites/default/files/
Am I supposed to change the location of my File Download files to the module sites/all/modules/contrib/pubdlcnt/, then upload my file to that location when creating my Article with downloadable file?
Thanks
Daniel
Comment #17
rituraj.gupta commentedYou just need to comment line no 137 to 139 in pubdlcnt.php
comment these lines:
if (!url_exists($url)) {
return false;
}
Now counter will work .
Comment #18
punyaruchal commentedI have also same problem . downloaded file record didn't count.
Drupal version: 7.34
PDC version: 7.x-1.0
File path URL: http://mysite-address/sites/all/modules/pubdlcnt/pubdlcnt.php?file=http:...
i tried #6 but not working for me.
Please can anyone help me what happen?
Comment #19
gregglesThere's not a patch here as far as I can tell, so moving to needs work for the generation of a patch.