Broken/missing handler error for my custom views filter? I am trying to write a custom filter for views. The goal is to filter by alias, but that's not important now. It seems like I am missing a step to get view to recognize my filter hander after adding my filter in hook_views_data_alter as in the following:

/**
 * Implements hook_views_data_alter().
 */
function alias_views_filter_views_data_alter(array &amp;$data) {
  $data['node']['alias'] = [
    'title' =&gt; t('alias filter'),
    'filter' =&gt; [
      'title' =&gt; t('alias filter'),
      'help' =&gt; t('Provides a custom filter nodes by their alias.'),
      'field' =&gt; 'nid',
      'id' =&gt; 'entity_alias',
    ],
  ];
}


I am able to get the filter to show in a view filter list.
Now, my filter handler defined in /docroot/modules/custom/alias_views_filter/Plugin/views/filter/Alias.php but it does not seem to be picked up by views and I always get Broken/missing handler whenever I try to add the filter. Here is my handler definition: 

&lt;?php

namespace Drupal\alias_views_filter\Plugin\views\filter;

use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\filter\StringFilter;
use Drupal\views\ViewExecutable;
use Drupal\Core\Form\FormStateInterface;


/**
 * Filters by alias.
 *
 * @ingroup views_filter_handlers
 *
 * @ViewsFilter("entity_alias")
 */
class Alias extends StringFilter {



  /**
   * The current display.
   *
   * @var string
   *   The current display of the view.
   */
  protected $currentDisplay;

  /**
   * @var views_plugin_query_default
   */
  public $query;

  /**
   * Constructs a new StringFilter object.
   *
   * @param array $configuration
   *   A configuration array containing information about the plugin instance.
   * @param string $plugin_id
   *   The plugin_id for the plugin instance.
   * @param mixed $plugin_definition
   *   The plugin implementation definition.
   * @param \Drupal\Core\Database\Connection $connection
   *   The database connection.
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $connection) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    // this does seem to get evaluated at all ?
    die('Death in handler');
  }

  protected function defineOptions() {
    $options = parent::defineOptions();
    $options['fields'] = ['default' =&gt; []];

    return $options;
  }

  /**
   * {@inheritdoc}
   */
  public function init(ViewExecutable $view, DisplayPluginBase $display, array &amp;$options = NULL) {
    parent::init($view, $display, $options);
    $this-&gt;valueTitle = t('Filter by alias');
  }

  public function buildOptionsForm(&amp;$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);
    $this-&gt;view-&gt;initStyle();
  }

  function query() {
    $this-&gt;ensureMyTable();
    $field = $this-&gt;tableAlias."nid"; //table_alias.".nid";
    $nids = $this-&gt;getNidsByAliasString($this-&gt;value);
    if (!empty($nids)) {
      $this-&gt;query-&gt;addWhere('AND', $this-&gt;options['group'], $field, $nids, 'IN');
    }
  }

  function getNidsByAliasString($aliasString) {
    $query = db_select('url_alias');
    $query-&gt;condition('alias', '%'.$aliasString.'%', 'LIKE');
    $result = $query
      -&gt;fields('url_alias')
      -&gt;execute();

    $nids = array();
    foreach ($result as $data) {
      array_push($nids, end(explode("/",$data-&gt;source)));
    }
    return $nids;
  }

}


Am missing a step or naming the filter incorrectly? 

Checking the logs,  I am getting these errors:

Notice: Undefined index: field in Drupal\views\Plugin\ViewsHandlerManager-&gt;getHandler() 
Notice: Undefined index: table in Drupal\views\Plugin\ViewsHandlerManager-&gt;getHandler() 
Notice: Undefined index: id in Drupal\views\Plugin\ViewsHandlerManager-&gt;getHandler()
Specify the data table instead of the base table, just replace node with node_field_data in your hook and run drush cr.

/**
 * Implements hook_views_data_alter().
 */
function alias_views_filter_views_data_alter(array &amp;$data) {
  $data['node_field_data']['alias'] = [
    'title' =&gt; t('alias filter'),
    'filter' =&gt; [
      'title' =&gt; t('alias filter'),
      'help' =&gt; t('Provides a custom filter nodes by their alias.'),
      'field' =&gt; 'nid',
      'id' =&gt; 'entity_alias',
    ],
  ];
}