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.
When you hide the user-reference field on the display tab, the module does not fire any node_access related function -- it works only when the field is visible. The original code looks for 'display' setting, which is probably wrong. I changed it to look for 'widget', see the attached patch (manually tested).
Comment | File | Size | Author |
---|---|---|---|
na.patch | 821 bytes | mariusz.slonina |
Comments
Comment #1
seattlehimay CreditAttribution: seattlehimay commentedThank you! Thank you!!
I had been beating my head against the wall, trying to figure out why things used to work, and now don't.
Installed patch, cleared cache, rebuilt permissions--now all is working for me again!!
Comment #2
danielb CreditAttribution: danielb commentedAh good call, thank you for finding this, this code was a guess based on debugged variables, cheers. I'll get to it when I can.
Comment #3
danielb CreditAttribution: danielb commentedActually all that code is dodgy, I think there is a better version of these loops in 'Node access node reference'
Comment #4
danielb CreditAttribution: danielb commentedactually guys this has been inadvertently fixed in the dev version already!
Comment #5
danielb CreditAttribution: danielb commentedI've made a new release.