I installed the lastest version of 7.x-2.x-dev

When I add a field of "user badge" in Views, it shows the following error:

Notice: Undefined property: stdClass::$unknown in views_handler_field_user_badges_badges_badge->render() (line 31 of /home/mallbar/www/demo13/sites/all/modules/user_badges/includes/views/views_handler_field_user_badges_badges_badge.inc).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

indyana’s picture

Ran into this myself today with User Badges 7.x-2.x-dev and Views 7.x-3.5. Seems to be because the override for the query function in views_handler_field_user_badges_badges_badge.inc isn't initializing the "field_alias" property. Since the query override in there isn't doing anything the parent function doesn't, seems like it could be removed?

I commented it out temporarily to eliminate the notice.

See:
http://api.drupal.org/api/views/handlers%21views_handler_field.inc/funct...

indyana’s picture

Status: Active » Needs review
FileSize
1.07 KB

This patch comments out the query function override in views_handler_field_user_badges_badges_badge.inc and should prevent the related error message.

imoreno’s picture

Status: Needs review » Reviewed & tested by the community

Works Perfect!

My watchdog logs looks much better now.
This patch is working for me.

Itzhak

indyana’s picture

Assigned: Unassigned » indyana
shabana.navas’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Fixed in Version 7.x-3.x. Please upgrade to this latest version.