Can only reference blocks that were added into a region

Created on 23 August 2018, about 6 years ago
Updated 23 February 2023, over 1 year ago

In my node, I have a block entity reference field. When I try to reference a block, it does not appear to the autocomplete unless it is first added to a region of a theme.

I believe this is handled in Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection::buildEntityQuery but not sure how to fix.

πŸ› Bug report
Status

Closed: outdated

Version

10.1 ✨

Component
BlockΒ  β†’

Last updated 3 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States albertski

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.

  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    @albertski, thanks for the report. We rely on issue reports like this to improve Drupal core.

    I tested this on Drupal 10.1.x, standard install. I created a test content type with a reference field for basic blocks. I then created two custom blocks. I did not place the blocks. I then added a new node of the test content type, in the autocomplete reference block, the two custom blocks were displayed. It seems this has been fixed.

    I am closing this as outdated. If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue β†’ (starting from "Install Drupal core").

    Thanks!

Production build 0.71.5 2024