Permissions by field triggers warning

Created on 25 September 2023, about 1 year ago

Problem/Motivation

I would like to fix issue desribed here : 3213875 πŸ› "read rights" always assigned Closed: cannot reproduce so basicly, Read right permission does not make any sense because by default this module does not denny anything there is still node visible no matter is read only access is triggered by this module or not.

Hence I installed this module : pbf β†’ which can allow view content only based on referenced field. Now I would like to use this module to add "edit" access only.

it works but once both modules installed it triggers following warning :

Warning: Undefined array key "value" in access_by_ref_node_access() (line 99 of modules\contrib\access_by_ref\access_by_ref.module).

access_by_ref_node_access(Object, 'update', Object)
call_user_func_array(Object, Array) (Line: 409)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'access_by_ref') (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('node_access', Object) (Line: 416)
Drupal\Core\Extension\ModuleHandler->invokeAll('node_access', Array) (Line: 97)
Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'update', Object, 1) (Line: 101)
Drupal\node\NodeAccessControlHandler->access(Object, 'update', Object, 1) (Line: 706)
Drupal\Core\Entity\ContentEntityBase->access('update', Object, 1) (Line: 195)
Drupal\node\Entity\Node->access('update', Object, 1) (Line: 68)
Drupal\Core\Entity\EntityAccessCheck->access(Object, Object, Object)
call_user_func_array(Array, Array) (Line: 160)
Drupal\Core\Access\AccessManager->performCheck('access_check.entity', Object) (Line: 136)
Drupal\Core\Access\AccessManager->check(Object, Object, Object, 1) (Line: 113)
Drupal\Core\Access\AccessManager->checkRequest(Object, Object, 1) (Line: 107)
Drupal\Core\Routing\AccessAwareRouter->checkAccess(Object) (Line: 92)
Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object) (Line: 105)
Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object, 'kernel.request', Object)
call_user_func(Array, Object, 'kernel.request', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

NOTE: It works fine for user referenced , the issues is triggered when using "Profile value" and the same field as used for PBF module.
is anyone able to check the issue ?

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΈπŸ‡°Slovakia coaston

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024