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.
#1801304: Add Entity reference field
Maybe we can take advantage of efqV2 "join" feature to check if the node is published, thus deprecate entityQueryAlter() in that class.
Comments
Comment #5
benjy CreditAttribution: benjy at Unearthed commentedCame here because CommentSelection access control is coupled to nodes and therefore doesn't work with a custom entity. There isn't anything that implies that
\Drupal\comment\Plugin\EntityReferenceSelection\CommentSelection
should be coupled to node but because of the access check it definitely is.I found this when adding a nested comment via the REST API. I can open a separate issue but given this issue is about re-writing that access control anyway, maybe we could do it here?
Comment #6
benjy CreditAttribution: benjy at Unearthed commentedHere's the relevant code.
Comment #7
larowlanComment #12
andypostIt looks like duplicate of #2958241: Impossible to reply to comments: commented entity considered unreferencable because CommentSelection::entityQueryAlter() joins on {node_field_data} table