admin/content/node
# type is Story
# and where status is sticky
# and where status is promoted
# and where status is not sticky
# and where status is not promoted
# and where status is published
# and where status is not published
Not really sure if this is a bug or not, but it doesn't make sense to me to be able to pick filter items that are let you select sticky and not sticky items.
* What are the steps required to reproduce the bug?
select and add each item on the filter list on admin/content/node
* What behavior were you expecting?
the compliment of selected items would no longer be selectable.
* What happened instead?
you can continue to add the compliment item of previously selected items.
Please include as much information as you can:
OS = Windows Vista Business Edition
webserver name and version = Apache/2.0.54 (Unix) PHP/4.4.7 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2
PHP version = PHP Version 4.4.7
Drupal version = 6.0-dev
Drupal path = admin/content/node
and everything else you might feel is relevant
-> MySQL: 5.0.24a
-> No error messages actually popped up, so I guess it's more of a usability issue or a runtime error?
Comments
Comment #1
jswaby CreditAttribution: jswaby commentedno one seems to care..
Comment #2
jenlamptonI care, and though it's a usability issue, I belive it is a bug. And it's still present in Drupal 7, so I'm bumping up this issue.
There is also a use case as follows:
What should happen:
When someone adds "where status is published" BOTH the published and unpublished items should be removed from the select list. When someone adds "where status is sticky" BOTH the sticky and remove-stickiness options should be removed, etc.
I'd love to spend some time on this, but I'm not sure my jQuery skills are strong enough. :/
Comment #3
caiovlp CreditAttribution: caiovlp commentedFixed the duplicate filters across the board and the opposite filters for the "status" type only.
Comment #5
caiovlp CreditAttribution: caiovlp commentedAdded a isset check. It's weird how those warnings are not being thrown on my machine when I run the unit tests. Hopefully, this will resolve the issue.
Comment #6
dcam CreditAttribution: dcam commentedClosed #2475255: Search filters admin/content as a duplicate. Also, there may be some duplication in #355820: Improve query filter UI on admin/content .
For the record, this isn't relevant in D8 because the status filter has been narrowed in scope to just the publication status. This was probably done when the content admin page was converted to be a View.
Comment #7
larruda CreditAttribution: larruda at CI&T commentedI've tested the latest patch proposed by @caiovlp under Drupal 7.x-dev and it works just as expected. You can't select opposites to be filtered at the same time. Great work!! Someone please commit this minor bugfix to Drupal core. Thanks!
Comment #8
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedThe patch looks pretty good and seems to work, but:
I couldn't figure out what this is for, since it handles non-"status" filters but none of them should ever be able to reach this code anyway since they don't allow multiple selections. Maybe it's there to fix a theoretical case. At the very least, it seems unrelated to this issue. Am I mistaken?
Comment #9
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedActually I also just realized that what @jenlampton recommended in #2 is not implemented here:
I think doing it that way would probably be better for usability since it avoids cluttering the select list and allows more of a drill-down approach.
Comment #10
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedSomething like this perhaps?
This could lead to PHP notices after it is applied in the unusual case where a user already has an active set of filters that have duplicates. But that's a pretty big edge case, and the PHP notices would go away the next time the filters are reset (and then never come back).
Comment #12
erickbj CreditAttribution: erickbj at CI&T commentedPatch on #10 works for me against the latest Drupal core dev version.