I have a text CCK field for countries, with a "select list" of allowed values; each value is labeled - e.g. AL|Albania, AM|Armenia, so that country code ('AL') is a value, and country name ('Albania') is its label.
It works OK in views (including display of properly translated country names when switching the language), except for summary views: when I add the "country" field as an argument and set "Action to take if argument is not present" to "Summary, sorted [whatever]", I see each group marked with country code instead of country name - i.e., field values are displayed instead of their labels.

Am I missing something?
Perhaps it could be fixed by altering view theme templates?
views-view-summary.tpl.php seems to print the value via "print $row->link"; could anybody suggest what should be changed to print value labels instead of values?
Are there any other ways to fix it?

Thank you!

Comments

merlinofchaos’s picture

If you only read one of these submission guidelines, read this one. (Then please read the rest) If your problem deals exclusively with fields or filters provided by another module (CCK, Image, VotingAPI are common) please post the issue under the queue for that module first; all modules are responsible for telling Views about their own fields. It's possible Views IS at fault, but the module maintainers are the best people to make that determination, and they can kick the issue into the Views queue with an explanation of what's wrong if that is the case.

My initial guess is that this is a bug in CCK -- the argument handler should be doing this translation.

merlinofchaos’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 6.x-2.0-rc1 » 6.x-2.x-dev
Component: page displays » Views Integration
GN’s picture

Thank you.
I read the submission guidelines before posting this issue, but I took into account that labels for CCK field values (keys) were properly displayed in various page views, except for summary views. I guess it may suggest that the problem is more likely to depend on Views output rather than its input from CCK.

yched’s picture

Status: Active » Fixed

Added that in a new views_handler_filter_many_to_one_content handler.

Uncovered a Views bug along the way : #296732: views_handler_argument_many_to_one misses arg = 0
So a views argument on field_number currently can't select nodes whose field_number value is 0 if field_number has 0 in its allowed values.

GN’s picture

Thank you!

Is this updated handler intended for inclusion in the next cck release, or already included in the current cck dev snapshot (I guess it might be in content.views.inc v 1.68.2.15 2008/08/18)?

yched’s picture

It is in content.views.inc v 1.68.2.15, included in the current -dev tarball

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.