Problem/Motivation

Currently the slots_content_block correctly checks if the entity detected by slots is actually accessible in the blocks access method. But buildSlotContents in SlotsService is not taking this into account when counting the items.

Steps to reproduce

- Create a slot and add 2 different pieces of content, for instance from 2 different block types
- For you test user make sure that the first one is not viewable via permissions
- Limit your slot to a cardinality of 1
- For the given user, the slot is now empty, even though there is a suitable match

Proposed resolution

- Don't add content to to the build if not accassible

Issue fork slots-3581243

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hydra created an issue. See original summary.

harlor’s picture

Status: Needs review » Reviewed & tested by the community

  • harlor committed fdb0e4ff on 1.x authored by hydra
    feat: #3581243 Empty slot content is considered into cardinality check...
hydra’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.