[wp-hackers] Custom Taxonomy and "Filter by Term" URL parameters
Manuel Schmalstieg
webdev at ms-studio.net
Sat May 11 19:30:52 UTC 2013
Hi list,
I just started working on an issue that I encounter each time I use Custom
Taxonomies.
If you use Custom Taxonomies, it would be great if you could perform that
quick test, and tell me if you can replicate the bug, or if I'm
hallucinating...
Here are the steps:
In the admin interface, if we go into Posts > Categories, or Posts > Tags,
we see a table showing all our Categories/Tags. The right column of that
table shows the number of Posts for each Category/Tag. That number is
hyperlinked - when we follow it, we see a listing of all the Posts that
have that Category/Tag.
For Categories, the link is built like this:
wp-admin/edit.php?category_name=my_category_term
For Tags, it looks like this:
wp-admin/edit.php?tag=my_tag_term
Now, let's say you have a Custom Taxonomy, called "foo". Go to the page
that shows the overview of that taxonomy, which should be
/edit-tags.php?taxonomy=foo
Now, the critical part:
Let's say you have a taxonomy term named "bar". Let's imagine that the term
has been applied to 3 Posts. If you click that number/link, you will arrive
at /edit.php?foo=bar
Expected result:
You would expect to see a filtered list, showing only the Posts that have
the "bar" term assigned (in our example, 3 Posts).
Actual result (at least in my case):
The ?foo=bar parameter has no visible effect: it doesn't isolate the 3
Posts with the "bar" term. I see the complete list of Posts, without any
filtering - the same as visiting /edit.php
What works:
If I manually change the URL parameter to make it look like
this:wp-admin/edit.php?taxonomy=foo&term=bar then I get the expected
result: I see the list of 3 Posts.
I started investigating this and created a patch, but before I continue, I
want to make sure this *is* a bug, and not some wrong custom taxonomy
configuration on my side.
Trac user Knut Sparhell tells me that he cannot replicate the problem.
If you want to comment on Trac or add improved patches, it's here:
http://core.trac.wordpress.org/ticket/24317
More information about the wp-hackers
mailing list