Entity autocomplete not showing nodes

by Aaron   Last Updated November 13, 2017 18:07 PM

I am creating a custom block plugin to display a content type called "media". On this plugin I have a blockform entity autocomplete to choose which media node to display. Currently, it does not autocomplete with any of my test media nodes. I am sure the rest of the plugin is working, I am just not able to select any of my nodes.

Media content type: Machine Name: media

blockform element:

$form['blurb_node'] = [
        '#type'               => 'entity_autocomplete',
        '#title'              => $this->t('Media'),
        '#target_type'        => 'node',
        '#selection_settings' => ['target_bundles' => ['media']],
        '#default_value'      => Node::load($this->configuration['blurb_node']),
    ];
Tags : 8 entities blocks


Related Questions


Load entity inside a module block

Updated May 31, 2017 22:07 PM

Create block type programmatically

Updated July 27, 2017 15:07 PM

block to display nodes using entityQuery with pager

Updated March 28, 2017 22:07 PM

use entityQuery within a Block plugin

Updated October 24, 2017 16:07 PM

How to accomplish own project?

Updated August 19, 2017 22:07 PM