Closed (fixed)
Project:
Protected Node
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2016 at 17:52 UTC
Updated:
17 Apr 2016 at 09:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
grimreaperHello,
Thanks for reporting this side effect. Here is a patch that may solve the problem.
Can you please test it?
Can you also provide the steps to reproduce the error you encountered? So we can add a test to not forget to catch your use situation.
Comment #3
slv_ commentedHi @Grimreaper,
The most important bit. Patch from #2 works fine for me, against the most recent version of the module. Thanks!
As you were asking for some info, this was my scenario:
I can confirm all the steps above works flawlessly when using the public filesystem, so it's not a problem in setup, as this just appears when switching to the private filesystem.
I can also confirm the issue is caused by protected_node, as I did debug the problem step-by-step, and protected_node was indeed returning -1 from protected_node_file_download() in a scenario where it shouldn't (the content type wasn't even configured to use protected_node).
Marking this as RTBC. Patch works and I think the logic added makes sense.
Thanks a lot!
Comment #4
grimreaperHello @slv_,
Thanks for the review.
I will make a test to check that.
Comment #5
grimreaperHere comes two patches. One that add the test and should fail, the other with the test and the patch, it should be green.
Comment #9
grimreaperI don't know why the tests fail on drupal.org and not locally.
But the fail and success I expected are present.
So the patch is merged.
Thanks for the review and tests.