-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file.module patch results in broken file_get_file_references() for downloading private files. #1021
Comments
Ok, I found the change here. Will need to look into issue 1805690 and the patch at https://www.drupal.org/files/issues/1805690_11.patch |
I think this comment on 1805690 is the issue I'm hitting because nginx_accel_redirect_file_transfer() is not getting the headers it needs in order to add the X-Accel-Redirect: header. |
Update: The patch applied to Omega D7 seems to be the # 11 patch. I just tried the more recent patch # 25 and I am now getting the file references returned from fields pointing to file (which is my case). It looks like the issue is still being resolved and it has certainly hit me for more than a few hours of debugging. If patch # 25 seems to work then I might suggest applying that one. |
Thank you Matt for the thorough investigation! if # 25 works for you, we can probably revert the old patch and use the newer patch instead. |
Wait, but isn't # 29 reporting a problem with the patch form # 25 ? Also, are you sure this is the real problem here? Note that the patch from # 11 is included in our D7 fork since August 15, 2015, so you should notice this for many previous D7 releases and not just latest. |
Sadly, it's been quite a while since I've updated. My site was still running 7.32, so I hadn't been using newer releases which had the patch. I did notice that it has been a year and I guess I'm an edge case for using nginx_accel_redirect module. In other words, I hadn't updated in over a year. :) I can verify that patch # 11 does have a problem with fields which are file types. I've defaulted to using the vanilla drupal version of file.module on 7.44 for now. It seems like they are still working on the issue and when I did apply # 25 in my dev environment the headers needed by nginx_accel_redirect_file_transfer() were being received. I think you would need to watch the issue to determine if there's a better patch. I know that # 11 within your 7.44.1 and 7.50.1 don't work for me. :( |
It looks like there is a patch being applied to the files.aegir.cc version of drupal on file.module. Right around 1059 on the 7.44.1 version I've been testing against.
file_get_file_references() is not returning valid references from the database (unless I'm missing something I should have that I don't)
I'm using nginx_accel_redirect module in conjunction with private file delivery storing files within /private.
It provides the transfer function for menu /system/files. This function is calling all modules with hook_file_download. Obviously, file.module will run file_file_download to return content type and size.
This is failing when using the patched version of file_get_file_references(). Unless it's just an older non-updated version of file.module? I don't know where to look.
I do know that with valid database entries, I get results with the vanilla drupal. I don't get valid references with the omega (patched?) version.
See images. What is the patch being applied if any?
For searchability for anyone else who hits this issue, the simple title might be "Private files won't download with omega Drupal"
Using code from file.module in files.aegir.cc drupal-7.44.1.tar.gz
![omega file module](https://cloud.githubusercontent.com/assets/96553/16717094/8b23ae10-46c3-11e6-8f1a-7897f0749698.png)
Using code from file.module in drupal 7.44
![drupal file module](https://cloud.githubusercontent.com/assets/96553/16717100/b1b243ca-46c3-11e6-9066-6df6d1c21734.png)
The text was updated successfully, but these errors were encountered: