For CCK fields that use allowed values, you can specify key/value pairs, like

1|Apple
2|Banana

The key (e.g. "2") is what gets indexed, however there is no map callback provided for the facet, so the facet list ends up looking like

Fruit
   1 (5)
   2 (13)

whereas you would really want

Fruit
   Apple (5)
   Banana (13)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kevin.dutra’s picture

Status: Active » Needs review
FileSize
1.46 KB
kevin.dutra’s picture

Whoops, incorrect callback name.

pwolanin’s picture

Status: Needs review » Needs work

is filter_xss() the right filtering here? Are some HTML tags allowed in allowed vallues? If so, you need to set the $map['#value'] to the content, and $map['#html'] to TRUE.

by default, check_plain() is applied, and in this case content will be double filtered.

kevin.dutra’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
1.49 KB

Whoops, I guess I missed your reply. Yes, you are correct. I guess I never read the description on the allowed values field that closely. At any rate, a revised patch is attached (re-rolled so that it applies to HEAD).