Topic Tag Archive wrongly displaying *all* topics
The Topic Tag Archive page (in the browser at /forums/topic-tag/[topic-name] ) is displaying all the topics in my forum rather than just the topics that are associated with the selected topic tag. It *does* list the tag correctly at the top of the page so I know that’s getting through.
The associated template part is taxonomy-topic-tag.php which calls bbpress/loop-topics.php but I’m not seeing an issue in either file (although with my limited PHP knowledge I’m not sure that I would recognize an issue anyway).
Is anyone else having trouble with this? I’ve checked it on two installations and am experiencing the same issue.
Also, when is taxonomy-topic-tag.php called vs page-topic-tags.php?
There is a trac ticket already submitted with this problem.
What vs. of WordPress are you using?
Thanks for the heads up, @anointed.
I’m running bbPress 2.0 with WordPress 3.2.1.
It’s really bizarre when this happens for some people and not for others. I’ve *never* been able to duplicate it when others can, so any insight you have into your installation and what caused it to start working incorrectly would be really helpful.
I’ll think on it more but the basics are that I have a customized bbPress theme installed as a child theme in wp-content/themes/ . This is a copied and modified version of bbPress’ base theme (I included all the theme files since I’ve needed to get into a lot of them). I’ve renamed that bbPress child theme (and its directory) bbps.
All the topics are entered via the front-end forum vs the admin panel.*
Finally, I don’t know that the tag archive was ever working correctly on these sites and then stopped. I’ve only seen it print all the topics instead of the respective tag’s topics.
For now I’m still accepting tags on new topics but I’m not displaying them on the single topic listing or the single topic edit page. If there was a way to remove the A tags from the tag list outside of core code I would do that so that I could at least display the tags in the short-term but it’s not a primary need.
If I can answer more questions about my installs let me know.
*I had an issue with a couple topics that I had started in the WP forum admin that was resolved after I deleted those and re-entered them through the forum itself, so I’ve stuck with that approach for now. The issue, as an aside, was that the topics were reflected in the Forum Archive topics count for each forum but the forum’s page showed no topics and the topic’s pages were 404.
I have the same problem, but unlike your setup, I have never added topic-tags via the admin side.
This problem exists on every install I use.
We do have one thing in common, being that I also use custom themes by adding all the needed bbPress files to the theme. However, even if I revert to twentyten ‘stock’ I still have the problem.
@anointed, to be clear, it was actually *topics* rather than topic tags that I added from the admin that were potentially causing that side issue I mentioned.
I hadn’t tried it yet but it’s good to know definitively that twentyten does the same thing. Based on what you mentioned earlier in this post I assumed that was the case.
Here is an example link showing the problem:
*there should only be 1 topic tagged phpbb, of course it shows 12
**I can revert the template back to twentyten and the problem remains.
I have no idea what I keep doing on every site to cause this so that I could assist JJ in figuring out what the issue is, but I have no idea why this is happening.
anointed – What plugins are you running?
If it’s working on some and not on others, the odds are plugins are to blame
I am not running any plugins.
I just setup a brand new install and after adding a couple of topics with a tag everything was fine. The counts were proper.
Then after I think it was the 3rd topic that I added a tag to the problem started happening again. I did nothing out of the normal.
At first I was thinking that maybe I would troubleshoot it by going one topic at a time and adding tags to see where the issue comes up at. However after it happened again today on a completely virgin setup, I give up.
I have been able to show JJ a number of sites now, around 5, where this happens. Some are totally virgin sites, some are using plugins, and some are using custom themes. As it happens to them all, I am not sure where the problem comes into play.
I will try again to setup a brand new site and see if it happens again. I will focus entirely on just the tags issue to see where the problem starts happening. Other than that, I have no idea how to troubleshoot the problem.
@johnjamesjacoby, it looks like your last response here was deleted so I’m pasting it back in from the email notice:
Here’s something to try:
1. Do you have customized topic tag slugs?
2. When you view a topic-tag, is the correct slug being used?
3. What happens if you replace what you see, with either ‘topic-tag’ or your custom slug?
1. I’m not using any custom slugs, so for topic tags it is the standard “topic-tag”.
2. That is correctly being displayed in the slug, so: /forums/topic-tag/monday-night-football.
3. I tried replacing “topic-tag” with “tags”. It displays correctly as the slug but it still pulls up all the topics instead of only those with the specified tag.
Let me know if I can give you any more details.
I deleted it because I tested it myself and couldn’t duplicate it, so I knew it wouldn’t matter. Thanks anyways for posting though. The mystery continues.
@johnjamesjacoby, I don’t know that it would help but would you be interested in looking at my bbPress instance? I have a live and a development space so there would be room for experimentation. If so, I PM’d you recently on BuddyPress so you could respond to that.
It’s only helpful if you can install the debug-bar plugin and turn WP_DEBUG on. If so, it would be nice to take a look.
It seems bbp_get_topic_tag_tax_id() always returns the default topic tag slug, i.e. “topic-tag” no matter what you use in your forum settings.
However, provided you use the default topic tag slug you can add some args to bbp-has-topics in taxonomy-topic-tag.php, like this:
if( bbp_has_topics( array( bbp_get_topic_tag_tax_id() => bbp_get_topic_tag_slug() ) ) )
Ok forget the stuff I said about bbp_get_topic_tag_tax_id always returning “topic-tag”. Thought the return value was the chosen setting.
Anyway, the above code does seem to work to make the loop display only those topics that’ve been tagged with the currently displayed tag.
The code by Martin_C fixed this for me! Great help.
You must be logged in to reply to this topic.