In function hook_views_data_alter (views.api.php) the use example code to change the handler of the title field is
$data['node']['title']['handler'] = 'modulename_handlers_field_node_title';

If I am not missing something, the code should be
$data['node']['title']['field']['handler'] = 'modulename_handlers_field_node_title';

to have any effect at all. It may be useful to review the entire set of examples, as it's probably the very starting point to learn how to override handlers.

Files: 
CommentFileSizeAuthor
#10 hook_views_data_alter-1946398-10.patch948 bytesbdgreen
PASSED: [[SimpleTest]]: [MySQL] 59,300 pass(es).
[ View ]
#8 hook_views_data_alter-1946398-8.patch1.03 KBbdgreen
PASSED: [[SimpleTest]]: [MySQL] 59,341 pass(es).
[ View ]

Comments

Feel free to provide a patch.

StatusFileSize
new1.26 KB
PASSED: [[SimpleTest]]: [MySQL] 1,555 pass(es).
[ View ]

Here it is. I also fixed a second similar error in the same hook declaration. I also changed some handler names for uniformity

Status:Active» Needs review

Status:Needs review» Active

Status:Active» Needs review

Project:Views» Drupal core
Version:7.x-3.5» 8.x-dev
Component:Code» views.module

Committed to 7.x-3.x. Thanks!

This patch can be in theory applied to Drupal 8.x as well.

Priority:Normal» Minor
Status:Needs review» Patch (to be ported)

.

Issue summary:View changes
Status:Patch (to be ported)» Needs review
Issue tags:+LONDON_2013_DECEMBER
StatusFileSize
new1.03 KB
PASSED: [[SimpleTest]]: [MySQL] 59,341 pass(es).
[ View ]

Ported Patch to Drupal 8.x

For drupal 8 this should look more like the following:

   $data['users']['example_field'] = array(
     'title' => t('Example field'),
     'help' => t('Some example content that references a user'),
-    'handler' => 'hook_handlers_field_example_field',
+    'field' => array(
+    'id' => 'example_field',
+  ),
   );
   // This example changes the handler of the node title field.
   // In this handler you could do stuff, like preview of the node when clicking
   // the node title.
-  $data['node']['title']['handler'] = 'modulename_handlers_field_node_title';
+  $data['node']['title']['field']['id'] = 'node_title';

StatusFileSize
new948 bytes
PASSED: [[SimpleTest]]: [MySQL] 59,300 pass(es).
[ View ]

Thx Daniel. Revised patch attached.

Status:Needs review» Reviewed & tested by the community
Issue tags:+VDC

great, thank you!

Title:Uncorrect example in function hook_views_data_alterIncorrect example in function hook_views_data_alter
Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.