Exposed Filters not compatible with alpha pager sort item

alanburke - July 2, 2008 - 08:48
Project:Views Alpha Pager
Version:5.x-1.4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

To recreate
Create a view with an exposed filter for a CCK text field
Use Views alpha pager

With no text entered in the exposed filter text field, the alpha page functions perfectly.

Insert some text in the text field and hit search - the search works fine.

The alpha charachers are now reduced to just the one beginning with the filter text.

EG
Search for 'Ab'
Results beginning with 'Ab' are shown [as per exposed filter settings]
The Alpha pager showns just 'A' and 'All'

Expected result - All Aplha pager links

Secondary issue - possibly related to http://drupal.org/node/183425
When clicking 'All', the filter text gets carried through - and therefore the 'All' listing only has those as defined the by the filter result.

The resultant Url looks like 'search?filter0=Ab&apage=* '

Maybe I'm doing something wrong in the config of the view?

Regards
Alan

#1

douggreen - July 2, 2008 - 10:52
Category:bug report» feature request
Status:active» won't fix

Primary Issue: You are right that the VAP knows nothing about the search filters. But I don't think that we should do anything. To use your example, if you search for Abc (searches must be at least 3 characters) using the standard views search filter or the views_fastsearch filter, it will find all nodes with abc somewhere in the node, as indexed by the search module. It will not restrict the result set to titles beginning with "Abc" as your example assumes. So, if it finds all nodes that have "abc" somewhere in them, the title can still be anything, and thus the alpha pager will not be restricted to just "A" and "All".

Secondary issue: I think that this is the proper behavior. I believe that I've had another bug report once before that the filter text was not carried through. The confusion is that the views_alpha_pager is not really a pager, but really a filter. And it filters whatever result set it is given. In this case, it is filtering within filter0=Ab.

#2

alanburke - July 2, 2008 - 14:08

Hi Doug

1. Just an aside, The exposed filter for a text field only needs a single character to work properly. It only filters on the exposed field.
I think this is differect from the search index filter, which as you've said, looks at the whole node, and needs 3 characters to search.

2. I agree, on reflection, that this is the proper behaviour.
VAP is filtering on the set it is given.
So as, in the example, a full set of A-Z characters in the pager, is reduced to 'A' and 'All' once the filter for 'Ab' is used.

I guess its hard to know what the 'expected' behaviour would be after a exposed filter is used.
My take would that it should behave as per a VAP filter.
All the A-Z characters and the 'All' link should be listed, and clicking on those would behave as if the exposed filter had never been used.

The issue currently is that
1. The VAP links are reduced based on the filter provided.
2. these VAP links retain the filter when clicked.

Hopefully anybody encountering this behaviour will find this issue.

Thanks for the help Doug,
Regards
Alan

#3

alanburke - July 2, 2008 - 14:16
Title:Exposed Filters not compatible with alpha pager» Exposed Filters not compatible with alpha pager sort item

Ok,
I think the exposed filters and VAP can be used together...

but not if the exposed filter is on the same field as the sort used to define VAP :-)

That's when the weirdness happens.

Thanks!
Alan

 
 

Drupal is a registered trademark of Dries Buytaert.