Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#11 | user_badges-views-handler-field.patch | 834 bytes | webevt |
#8 | user_badges_views.patch | 529 bytes | webevt |
Comments
Comment #1
NancyDruThanks. 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.
Comment #2
Desi Raaj CreditAttribution: Desi Raaj commentedk thank you :)
Comment #3
boran CreditAttribution: boran commentedFYI, 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....
Comment #4
NancyDruI have not started on fixing Views yet.
Comment #5
emmsquare CreditAttribution: emmsquare commentedSeeing 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.
Comment #6
NancyDruYou 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.
Comment #7
emmsquare CreditAttribution: emmsquare commentedNancy- 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.
Comment #8
webevt CreditAttribution: webevt commentedThe problem is in .info file. In Drupal 7 module must include views handler files within .info file with the files[] directive.
Patch attached.
Comment #9
hoporr CreditAttribution: hoporr commentedConfirming: patch in #8 fixes the problem.
Comment #10
Maks CreditAttribution: Maks commentedAfter #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).
Comment #11
webevt CreditAttribution: webevt commentedMaks, the php notice has occured not because of the patch from the #8 post.
Here is a patch to repair this notice.
Comment #12
imoreno CreditAttribution: imoreno commented#8 did not did the trick for me, handler is still broken.
any other ideas?
BR
Itzhak
Comment #13
imoreno CreditAttribution: imoreno commentedafter patching # 8 + 11 - all is working as expected.
THX!
Comment #14
webevt CreditAttribution: webevt commentedimoreno, did you clear the cache?
Comment #15
Miria CreditAttribution: Miria commentedApplied both #8 and #11 and Views works nicely now.
Comment #16
imoreno CreditAttribution: imoreno commentedpatch on #8 fails with last 27.6.12 release, is there another patch to test? :) - currently views display is broken.
Comment #17
imoreno CreditAttribution: imoreno commentedComment #18
SebCorbin CreditAttribution: SebCorbin commentedWill try to update views integration soon to work with views 3 and lazy load includes.
Comment #19
Youblob CreditAttribution: Youblob commentedIt says you need to add
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.
Comment #20
shabana.navas CreditAttribution: shabana.navas commentedPlease upgrade to Version 7.x-3.x.