Closed (works as designed)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Aug 2011 at 21:02 UTC
Updated:
25 Aug 2011 at 21:20 UTC
Hi all,
it seems when you have a cck field defined in views and you rewrite the output of it, when you have sortable columns activated on that field, the column will sort on the original field, not on the rewritten field output.
Let's say you have the two text fields with values:
Dylan
Bob
After rewriting there is:
ByeDylan
HiBob
When you sort the column you get:
HiBob
ByeDylan
And that's wrong. :)
Tried and tested it: it always sort on the non-rewritten values.
Is this easy to fix for you guys? ;-)
Thanks!
Comments
Comment #1
merlinofchaos commentedThat's the only way it can work.
The sort is done as part of the query. The rewrite happens after the query is done. If you want to sort on rewritten data, you must use something like computed field that will rewrite the data and store it in the database, so that it can then be sorted on.
Comment #2
jvdurme commentedYeah, I constructed something like this now.
Thanks for the reply :)