Issue I encountered was outputting user badge in views, when I selected the following field:
User Badges: Badge
An individual user badge.

I got the following message:
The handler for this item is broken or missing and cannot be used. If a module provided the handler and was disabled, re-enabling the module may restore it. Otherwise, you should probably delete this item.

I have applied these patches:
http://drupal.org/node/1304960
http://drupal.org/node/1279532#comment-5097992
http://drupal.org/node/1304520

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NancyDru’s picture

Status: Active » Postponed

Thanks. I am assuming that the Views code that is in place, at the moment, is for Views 2 and will also need to be updated. After I get the core module functionality straightened out, I will work on this.

Desi Raaj’s picture

k thank you :)

boran’s picture

FYI, I tried the latest cumulative zip on http://drupal.org/node/1306032 and adding a User Badges field causes views to mention a "Broken/missing handler "

In Watchdog one sees notices like this:
Undefined index: element_type_enable in views_handler_field->options_submit() (line 403 of /disk2/www/drupal-7.8/sites/all/modules/views/handlers/views_handler_field.inc).

The views code is:
function options_submit(&$form, &$form_state) {
$options = &$form_state['values']['options'];
$types = array('element_type', 'element_label_type', 'element_wrapper_type');
$classes = array_combine(array('element_class', 'element_label_class', 'element_wrapper_class'), $types);

foreach ($types as $type) {
if (!$options[$type . '_enable']) {
$options[$type] = '';
}
}

But my views know-how is not yet good enough to see where the issue is....

NancyDru’s picture

I have not started on fixing Views yet.

emmsquare’s picture

Seeing the same issue. Would be very appreciative of seeing it fixed. Anybody know of a workaround to get any badge fields to show in a view. Trying to create a member gallery with badges showing.

NancyDru’s picture

You might see if you can set up a relationship. The "uid" points to user_badges_user, where "bid" points to user_badges_badges, which has an "image" field.

emmsquare’s picture

Nancy- If understand what you are asking me to try: I can't access the image field associated with user_badges_badge. Any time I try to add either the Badge or Grouped User Badges fields via the views menu it fails with the "Missing handler" error and I can't proceed any further. I've also tried this with the latest 7.x-1.x-dev version that you posted this month with the same issue.

webevt’s picture

Status: Postponed » Needs review
FileSize
529 bytes

The problem is in .info file. In Drupal 7 module must include views handler files within .info file with the files[] directive.

Patch attached.

hoporr’s picture

Confirming: patch in #8 fixes the problem.

Maks’s picture

After #8
Notice: Undefined property: stdClass::$unknown in views_handler_field_user_badges_badges_badge->render() (line 30 of /home/----/sites/all/modules/user_badges/views_handler_field_user_badges_badges_badge.inc).

webevt’s picture

Maks, the php notice has occured not because of the patch from the #8 post.
Here is a patch to repair this notice.

imoreno’s picture

#8 did not did the trick for me, handler is still broken.
any other ideas?

BR
Itzhak

imoreno’s picture

after patching # 8 + 11 - all is working as expected.

THX!

webevt’s picture

handler is still broken.
any other ideas?

imoreno, did you clear the cache?

Miria’s picture

Applied both #8 and #11 and Views works nicely now.

imoreno’s picture

Status: Needs review » Reviewed & tested by the community

patch on #8 fails with last 27.6.12 release, is there another patch to test? :) - currently views display is broken.

imoreno’s picture

Status: Reviewed & tested by the community » Needs work
SebCorbin’s picture

Title: Views User Badges: Badge handler » Views 3 integration: update badge handlers

Will try to update views integration soon to work with views 3 and lazy load includes.

Youblob’s picture

It says you need to add

<?php
  if (module_exists('user_badges')) {
    print user_badges_for_uid($uid);
  }
?>

Where are you supposed to put this info, and what patches do you need to display the images?
Im just using it as a simple function to display a "Support Button" below user images in profile and on blog posts from the users. I've uploaded a large set of buttons, where the user is able to select one of them.

shabana.navas’s picture

Status: Needs work » Closed (fixed)

Please upgrade to Version 7.x-3.x.