Bug #11199
[patch] do not return all data when no tags are used to filter
| Status: | Accepted | Start date: | 2010-12-01 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | Francois Suter | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Votes: | 1 (View) |
Description
I use tagpackprovider to filter my content by tags defined via $_GET parameters, so I have a Tags from expressions:
vars:theme vars:domain vars:typeI have three use cases:
- default: no filtering, show all data
- search: filtering, show some data
- search failed: filtering, show no data
According to this, I use the following configuration for secondary provider:
- If filter empty: Display everything
- If secondary provider returns nothing: Display nothing (to show no data when search failed)
It seems to make sense however in default case it will show no results because tagpackprovider recognize there is no filter and wrongly assume it should return no data. Then according to the configuration the primary provider will return nothing. Basically Tagpackprovider confuse "not filtered" and "filtered but no result" and return same (empty) result in both cases.
The attached patch fix tagpackprovider behavior by returning all UID in case of not filtered.
Related issues
| related to Tag Pack Data Provider - Feature #11528: [patch] Allow to ignore tag selection with specific syntax | Accepted | 2010-12-17 |
History
Updated by Francois Suter over 2 years ago
- Status changed from New to Needs Feedback
- Assignee set to Francois Suter
I would propose to add a flag similar to what exists for the relations between filters and providers: it would let the user choose what to do when the expressions were not empty, but the selection of tags returned nothing.
After that, rather than sending back all UIDs, which may potentially be a huge list, I would suggest introducing the \all keyword here too. This way we don't need to:
- get all the UIDs from the database
- match all those UIDs in the query that would receive such a condition
For example, in tx_dataquery_wrapper::addIdList(), we would just skip adding a IN condition if the value of the list is \all.
What do you think?
Updated by Adrien Crivelli over 2 years ago
- File secondary_provider_filter.png added
I am not sure about the flag you talk about. Isn't it the already existing "If filter empty" ?
Otherwise, optimisations you suggested about "\all" seems to be a good idea. I'd do that.
Updated by Adrien Crivelli over 2 years ago
I reread my post and it's actually obvious the flag you talked about :P (it's getting late...)
That may be a good idea as well ! But if you don't need it right now (I don't), I'd postponed it for later to avoid the bloatware effect ;-)
Updated by Francois Suter over 2 years ago
- Target version set to 1.2.0
Updated by Francois Suter 11 months ago
- Target version deleted (
1.2.0)
Updated by Adrien Crivelli 11 months ago
I believe this issue does not need feedback anymore, or did I miss something in our conversation ?
I would, maybe, create a separate issue for the flag suggested. And, if possible, try to close the original issue with the patch submitted.
Updated by Francois Suter 11 months ago
- Status changed from Needs Feedback to Accepted