If a vocabulary is set to "multiple", the form that's displayed on the badge edit page renders as a multiple select element, and passes to the form submit handler as an array. Thus the value is stored in the database as the integer evaluation of the array, 1.

Further, the user can select one or many terms, but none of them are saved correctly unless their tid happens to be 1.

This patch fixes the user badge edit form so that the select element is single-select, and the value passed to the submit handler is actually an integer.

Now, can someone please explain what is the point of associating a badge with a vocab term?
I can't for the life of me figure out what functionality this enables.

CommentFileSizeAuthor
user-badges-tid.patch552 bytesAaronBauman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NancyDru’s picture

Good question. I can't see that it does much either. Perhaps it was an attempt to mimic Taxonomy Image.

shabana.navas’s picture

Status: Active » Closed (won't fix)
AaronBauman’s picture

Status: Closed (won't fix) » Active

Closed won't fix?
wtf?

If you're not going to support the behavior of assigning badges to tids, then remove the behavior.
You can't just mark the bug as won't fix.

shabana.navas’s picture

Status: Active » Closed (fixed)

Committed patch.

NancyDru’s picture

Shabana, after you commit a fix, you should leave the issue in "Fixed" status so that people can see it. The system will close it automatically after two weeks.

shabana.navas’s picture

@NancyDru, thanks. Will keep that in mind.