If you add the "Content: Last comment uid" field to a view of comments, you get a fatal error:

Fatal error: Call to undefined method views_handler_filter_user_name::pre_render() in /web/sites/all/modules/views/includes/view.inc on line 1115

This was introduced in #1301366: Adding Last Comment Author Picture to Node View and seems incorrect. The attached patch is probably closer to correct, although still seems to result in SQL errors. But it least it doesn't pop up an alert box with a fatal error...

I can't actually take credit for this patch. I found it in the Drupal Gardens codebase and am basically just making sure it gets onto drupal.org.

Comments

dawehner’s picture

StatusFileSize
new419 bytes

The field doesn't seem to be used by many people, because they would have all recognized the problem, so thanks for providing a patch and reporting the issue!

The problem of using the views_handler_field_user would be, that this handler actually requires an uid column in the table, which is not
there.

Well the handler could be extended, but it wouldn't make that much sense, as all kind of similar places rely on the relationship to get more detailed use cases in.

dawehner’s picture

Status: Needs review » Fixed

Just committed this version of the patch. Thanks for the reporting and the initial patch!

Status: Fixed » Closed (fixed)

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