I'm trying to create a filter within Views of options A - Z based on the first letter of the node title. This is a glossary application so users need to sort by the first letter of the term. I can set up each option fine (using "A" "starts with" "A", "B" "starts with" "B", etc. through to Z). The problem is that when I save the filter, Views is re-sorting the options in non-alphabetical order and the resulting select menu seems a somewhat randomly ordered display of letter options.

I'm not sure whether this is the issue, but in trying to correct the re-sort, it looks like their are limited weight options (-10 to +10) and so multiple options are forced to have the same weight when setting up an alphabet-based sort. Regardless, I cannot get options A to Z to display in alphabetic order, as desired. Even after manually trying to resort the options into the correct order, Views still re-sorts the options out of sequence.

CommentFileSizeAuthor
#1 views-1876684-1.patch515 bytesdawehner

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new515 bytes

This is no serious patch, because i don't have an answer for a proper number, but it fixes at least your problem :)

billp44ruby’s picture

Thanks, that did the trick! Will that patch automatically be in the next release so when I update Views next it will be fixed there?

dawehner’s picture

Well, someone has to commit the patch and then it will be probably included in the new version.

uno’s picture

AFAIK, still not applied.

rinasek’s picture

Thanks mate!

Someone needs to commit this.....

user654’s picture

.

sachbearbeiter’s picture

Any news of this commited?

or is there some form of overwrite, so i don't have to hack views for one line?

ksenzee’s picture

Version: 7.x-3.5 » 7.x-3.x-dev
Priority: Major » Normal
Issue summary: View changes

Just ran into this today. I know the patch seems silly, but I think A-Z lists are a reasonable use of grouped filters, and certainly 42 allows for that use, while 10 doesn't. I'd say go ahead with it. :)

ksenzee queued 1: views-1876684-1.patch for re-testing.

kreuter’s picture

This patch neatly solved a problem for our site which uses A-Z grouped filters quite extensively, as ksenzee describes. Thanks!

joelpittet’s picture

Please read the comment and the patch in #1. It's not a serious patch, regardless of it helping you.

Likely the delta needs to be incremented or calculated along with another value.

chris matthews’s picture

Status: Needs review » Needs work