How do you add table column sort functionality to an EntityFieldQuery? I have an EntityFieldQuery that gets displayed in a table. How do I add clickable sort-by-column functionality? When I use regular db_select queries I can sort using the following code:

 $query = db_select('tablename', 't')
   -&gt;extend('PagerDefault')
   -&gt;limit(50)
   -&gt;extend('TableSort')

 // ...

 $query = $query-&gt;orderByHeader($header)
 $results = $query-&gt;execute();


Everything looks good and when the table is displayed I can click on the columns and they are hyperlinks and I can sort just fine. However, now that I have an EntityFieldQuery I can't seem to duplicate the functionality. This is what I have so far:

$header = array(
  'title' =&gt; array(
    'data' =&gt; t('Date'),
    'type' =&gt; 'field',
    'specifier' =&gt; array(
      'field' =&gt; 'field_articledate',
      'column' =&gt; 'value',
    ),
  ),
);
$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'article')
  -&gt;propertyCondition('status', 1);

$query = $query-&gt;tableSort($header);
$query = $query-&gt;pager(100);

$results = $query-&gt;execute();


A one-column header appears and it says "Date" as expected, but it is not a clickable hyperlink. What am I doing wrong? What is the correct syntax?
I know this thread is a little old but adding 'field' to the array fixes the issue.

e.g.

$header = array(
  'title' =&gt; array(
    'data' =&gt; t('Date'),
    'type' =&gt; 'field',
    'specifier' =&gt; array(
      'field' =&gt; 'field_articledate',
      'column' =&gt; 'value',
    ),
    'field' =&gt; '', //There is an Isset call that prevents links from showing without this.
  ),
);
$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'node')
  -&gt;entityCondition('bundle', 'article')
  -&gt;propertyCondition('status', 1);

$query = $query-&gt;tableSort($header);
$query = $query-&gt;pager(100);

$results = $query-&gt;execute();


See: https://www.drupal.org/node/885014#comment-3464666 for a comment on the issue.