Why is my views sort handler not appearing in the list?

by Kevin Nowaczyk   Last Updated November 11, 2017 14:07 PM

i am working on porting views_raw_sql to D8. I got the raw field working rather easily. However, I cannot for the life of me get a sort, filter, or argument to appear in the list of available options.

My module.views.inc file contains the line

$data['views_raw_sql_8']['raw_sort'] = [
'title' => t('Raw Argument'),
'help' => t('Provide raw SQL contextual filter.'),
'sort' => [
  'id' => 'sort_views_raw_sql_8',

inside hook_views_data()

also I have a file: root/src/Plugin/views/sort/RawSQLSort.php that is a nearly line-by-line copy of the standard sort:

namespace Drupal\views_raw_sql_8\Plugin\views\sort;

use Drupal\views\Plugin\views\sort\SortPluginBase;

 * Default implementation of a raw SQL sort plugin.
 * @ingroup views_sort_handlers
 * @ViewsSort("sort_views_raw_sql_8")
class RawSQLSort extends SortPluginBase {


The full code is at http://cgit.drupalcode.org/sandbox-Beakerboy-2922663/tree/

Any advice on what I’m missing to get this sort to show up in the list of available options so I can begin to fill in and test the functionality? My code currently passes pareview with no warnings or errors.

Related Questions

Exposed filters go to request arguments

Updated June 04, 2015 02:03 AM

How to alter combined filter value programatically?

Updated March 27, 2015 14:18 PM

How to set up this view of commerce orders...?

Updated January 11, 2017 10:03 AM