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']),

UPDATE: I am able to manually type in the name of a node, but the autocomplete functionality does not work at all.

  • Was an issue with my local environment. Works on live.
    – Aaron
    Nov 13, 2017 at 18:49


Browse other questions tagged or ask your own question.