webform_query_webform_submission_access_alter filters out accessible node when submission is left joined

Created on 18 August 2022, about 3 years ago
Updated 1 August 2025, about 2 months ago

Problem/Motivation

This is similar to πŸ› node_access filters out accessible nodes when node is left joined Needs work but for webform submissions.
When using a view listing nodes with an optional relation to a submission, nodes that don't have any submission attached are not listed.

This happens because webform_query_webform_submission_access_alter() adds conditions to the base table and not the join condition.

Steps to reproduce

  1. Enable views and webform.
  2. Create a view listing nodes.
  3. Add a relation to a webform submission.
  4. Nodes that don't have a submission are not returned by the view.

Proposed resolution

webform_query_webform_submission_access_alter() should be patched to apply the conditions to the join condition (similar to what the πŸ› node_access filters out accessible nodes when node is left joined Needs work patch does for NodeGrantDatabaseStorage).

πŸ› Bug report
Status

Needs review

Version

6.2

Component

Code

Created by

πŸ‡«πŸ‡·France prudloff Lille

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024