Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The fix for the core bug reported in #1143460: hook_file_download_access_alter missing entity argument is taking a different, and better, approach then I originally suggested. I'm hopeful we'll get that bug fixed soon and download_count updated correctly.
However, in the meantime I'm going to keep this issue updated with whatever current patch is required to use the 7.x-3.x version of download_count.
Comment | File | Size | Author |
---|---|---|---|
#17 | download_count_7_16.patch | 906 bytes | adammalone |
#16 | module.inc-patched-issue-1484206-for-drupal-core-7.16.zip | 10.17 KB | ANDiTKO |
#13 | download_count_required_core_patch_7_16.patch | 906 bytes | chirhotec |
#8 | download_count_required_core-patch.patch | 932 bytes | yurg |
download_count_required_core-patch.patch | 930 bytes | WorldFallz |
Comments
Comment #0.0
WorldFallz CreditAttribution: WorldFallz commentedcorrect punctuation
Comment #1
famous CreditAttribution: famous commentedthere is no f*****g description anywhere to install this f****n patch!!!!
[edited to remove foul language]
Comment #2
WorldFallz CreditAttribution: WorldFallz commented1. lose the foul language
2. it's mentioned right on the project page
Comment #3
CWz CreditAttribution: CWz commentedI'm running on a shared host with no ssh. how do I apply the patch manually?
Comment #4
WorldFallz CreditAttribution: WorldFallz commentedi'm not really sure-- you need to be able to edit the file and make the changes. Maybe do it locally and then upload load it however you install stuff without ssh.
Comment #5
Mekhet-1 CreditAttribution: Mekhet-1 commentedHi WorldFallz
for the life of me i cannot find anywhere on how to install the patch. I've checked the project page. Probably just an id10t error. Can you please assist
Thanks
Comment #6
WorldFallz CreditAttribution: WorldFallz commentedThat's not a module specific thing, see http://drupal.org/patch/apply.
Comment #7
lukusIs there a new patch available for 7.14?
Comment #8
yurg CreditAttribution: yurg commentedFor D 7.14 please try attached one.
Comment #9
robwithhair CreditAttribution: robwithhair commented#8 worked for me.
Comment #10
warmth CreditAttribution: warmth commented7.15 needs this patch?
Comment #11
yurg CreditAttribution: yurg commentedre: 7.15.
Yes, had to apply it after update.
Comment #12
WorldFallz CreditAttribution: WorldFallz commentedyep-- until the bug is fixed in core d7 (it's not even been fixed in d8 yet and that has to happen first), this patch is required. Believe me-- as soon a fix has been committed I'll update this thread!
Comment #13
chirhotec CreditAttribution: chirhotec commentedUpdated for Drupal 7.16
Comment #14
ANDiTKO CreditAttribution: ANDiTKO commentedIm getting
In Drupal 7.16 for patch #8.
Comment #15
destinationsound CreditAttribution: destinationsound commentedcan anyone be nice enough to zip up their patched module's folder and attach to this thread the ones who do not or cannot patch can access this module? thanks!
Comment #16
ANDiTKO CreditAttribution: ANDiTKO commentedApplied patch #13
Here is the patched module.inc file for Drupal Core 7.16 +
Replace this module.inc with "includes/module.inc" and use it at our own risk.
Comment #17
adammaloneHere's a rerolled patch for 7.16. I've checked resetting drupal to 7.16 HEAD and applying the patch again - cleanly applies.
Try this over another module.inc as it can be reapplied as necessary. This patch is probably the same as the one above but perhaps it will apply to your install.
Comment #18
idefix6 CreditAttribution: idefix6 commentedIs there a chance to get this patch integrated into drupal?
Comment #19
warmth CreditAttribution: warmth commentedSo bad that 7.17 came out without it...
Comment #20
adammaloneThere is another issue for getting that patch into drupal over here: http://drupal.org/node/1143460
Comment #21
toxiclung CreditAttribution: toxiclung commented#17 worked for me on 7.17
subscribing...
Comment #22
alfaguru CreditAttribution: alfaguru commentedRather than requiring this patch, given that file.module always calls hook_file_download_access immediately before hook_file_download_access_alter, could you not save the extra parameter in a hook_file_download_access implementation then retrieve it in the alter step?
Eg:-
Not very pleasant, I admit, but I feel it's better than requiring a core patch.
Comment #23
WorldFallz CreditAttribution: WorldFallz commentedyeah-- I wanted to avoid that ugliness when I had hope that such a simple bug would be fixed pretty quickly, but given it's now almost 2013, I guess that plan is moot, lol. I'll try to roll a new snapshot with this fix this week.
Comment #24
adammaloneThe patch is RTBC in #1143460: hook_file_download_access_alter missing entity argument - I think a core committer just needs poking to review and commit.
Comment #25
spencerthayer CreditAttribution: spencerthayer commentedNow I am having problems related to this error. It started after I carelessly did an update. Crap.
This has been a problem for a while. How come this patch hasn't been committed into the main branch? It's 2013 now.
Comment #26
WorldFallz CreditAttribution: WorldFallz commentedDavid_Rothstein FTW: #1143460: hook_file_download_access_alter missing entity argument.
So, there will be no workaround release.
Once drupal 7.19 is released, I'll do a quick test to verify everything works and finally finally finally roll an official release of download_count for D7!
Comment #27
warmth CreditAttribution: warmth commentedThose are great news!
Comment #28
herbiek CreditAttribution: herbiek commentedYess! Finally, waiting for this a long time. Thank you!
Comment #29
herbiek CreditAttribution: herbiek commentedDrupal 7.19 is out! Whats the next step?
Comment #30
adammaloneAs was mentioned in #1143460: hook_file_download_access_alter missing entity argument since 7.19 is security only, this patch will appear in 7.20.
Comment #31
haydeniv CreditAttribution: haydeniv commentedFYI: http://drupal.org/documentation/version-info
So the earliest that patch will be in core is Feb. 6.
Comment #32
gChen07 CreditAttribution: gChen07 commentedIs there any update regarding this module.. I am using D7.17 and I tried using the 7.x release and patches but as with everyone applying patches is very confusing and I am also afraid that I might ruin the site due to fatal error messages I am dealing with most when I add or delete module.. so I decided to wait for the formal release of this module.. I am creating website for compiling electronic thesis and dissertation where this module really helps to track research utilization as well as abuse in downloading. Thanks in advance..
Comment #33
gChen07 CreditAttribution: gChen07 commented@#21
What patch did you use.. and how did you installed it
Comment #34
chirhotec CreditAttribution: chirhotec commentedMaybe we could include this patch into the Fix Core module?
"This module collects various fixes to core issues that have not been implemented yet. By default, all of these fixes are disabled, and you can enable them one by one."
That way, any time we upgrade core, we just need to update that module, and those unfamiliar with the patching process have an easy solution.
Comment #35
warmth CreditAttribution: warmth commentedThat's a great idea.
Comment #36
adammaloneActually not the best idea - it's already in Drupal 7-dev so should be released with 7.20 sometime in March!
Comment #37
WorldFallz CreditAttribution: WorldFallz commentedYep I agree with typhonius-- the fix could be released by the time the patch is created and accepted for the fix core module and would therefore require yet another patch to fix core to remove it.
That said however, it's entirely up to whoever wants to create the patch for fix core and the maintainer of the fix core module.
Comment #38
adammaloneCorrection - 7.21 since 7.20 was released today and is a security only release
Comment #39
Kaese CreditAttribution: Kaese commentedIs this patch now rolled out in 7.21 or has it been delayed again since this release was merely a bugfix for 7.20?
Comment #40
warmth CreditAttribution: warmth commentedComment #41
Kaese CreditAttribution: Kaese commentedLike I said. It's a bugfix. Doesn't answer my question, though.
Comment #42
WorldFallz CreditAttribution: WorldFallz commentedthe best way to know what made it into a release is to check the release notes, but in this case dave updated the original issue: http://drupal.org/node/1143460#comment-7145622
so the short answer it no, it's no in the current release and still requires the dev version.
Comment #43
deanflory CreditAttribution: deanflory commentedNo, not included in D7.21
Comment #44
adammaloneThe functionality provided by this patch is now in Drupal core!
Comment #45
WorldFallz CreditAttribution: WorldFallz commentedYep-- I just downloaded and confirmed the module.inc file has the required changes. Finally, closing this issue!
Look for an official release of download_count within the week (I just want to install on a freshly created drupal 7.22 and confirm it works properly).
Comment #47
gChen07 CreditAttribution: gChen07 commentedWhere can we find the official new release of download count?
Comment #48
deanflory CreditAttribution: deanflory commentedThe bug was in Drupal core, not this module, therefore no new module update was required. Drupal 7.22 finally fixes the problem and any patch on this issue is no longer needed as long as you're updated to Drupal 7.22.
Comment #49
WorldFallz CreditAttribution: WorldFallz commenteddeanflory is correct. Also I anticipate the current dev version will be exactly what gets tagged as an official release, I just want to install it fresh and give it a test first-- I just haven't had the chance yet.
Comment #50
gChen07 CreditAttribution: gChen07 commentedI already installed the new drupal 7.22 version and the download count 7.x-3.x dev version.. download count report is available in my report link.. I downloaded a file 22 times but it does not count or reflect in my download count report.. the file is from my private folder.. I even double check my permission and uncheck the skip count for all user so even download by the administrator will be counted. Did I miss something?
Comment #50.0
gChen07 CreditAttribution: gChen07 commentedseems not ;-)