Not a bug Tag pruning not working?

imthebest

Well-known member
Hello,

On the 1.5 HYS regarding the new thread tagging functionality Chris said:

Normally tags will be removed when they are no longer used (specifically, when their last usage is removed).
XF 1.5 - Thread Tagging

Before 1.5 I was using [Tinhte] XenTag. After upgrading to 1.5 I used [by PiX-house.com] Importer for [Tinhte] XenTag to XenForo 1.5 to import all tags from XenTag to XF's own tagging system. Please note that when I migrated to XenForo I also used XenTag to import all the tags from vBulletin 3

Now in 1.5 I imported like 20,000 tags from XenTag of which around 1,500 have their "Last Used" value set to blank (nothing) and also the "Total" set to "0" (zero). A week has passed and those tags are still on the system.

I have also noticed something strange: let's say I manually go to a soft-deleted thread that had the tag "hello world" (which currently is being listed with a "Last Used" set to blank and "Total" to zero), on that thread I can see the tag being listed and when I click on it I get the error "No results found". I believe that the tag should not be visible when viewing the thread because it has the "Last Used" set to blank and "Total" to zero. Maybe this was a bug in XenTag/vBulletin 3 not properly deleting tags after a thread got soft-deleted.

Thanks,
Super120
 
This isn't actually something that is triggered periodically, but instead triggered at the moment the last usage of a tag is removed.

On the assumption that tags with no date and no usages have been imported from elsewhere, XF won't ever touch these.

However, if you tag a thread with a new tag, and then hard delete that thread, that tag will get deleted.

We don't delete tags when a thread is soft deleted.
 
Hello,

Thanks for the reply. Could you please confirm if this normal?

I have also noticed something strange: let's say I manually go to a soft-deleted thread that had the tag "hello world" (which currently is being listed with a "Last Used" set to blank and "Total" to zero), on that thread I can see the tag being listed and when I click on it I get the error "No results found". I believe that the tag should not be visible when viewing the thread because it has the "Last Used" set to blank and "Total" to zero. Maybe this was a bug in XenTag/vBulletin 3 not properly deleting tags after a thread got soft-deleted.

Thanks,
Super120
 
Yes, that is normal.

We don't delete tags as a result of soft deleting content. They would usually be marked last_use_date = 0 and use_count = 0 and the entry in xf_tag_content will be marked as visible = 0. When we look for tags attached to content, we only look for content that is visible. In other words, you should never see non-visible content in tags results pages (regardless of permissions).
 
I have created the following test thread: https://xenforo.com/community/threads/testing-something.103930/

It contains a new tag called "threadid103923". Please soft-delete that thread and then reload it (so you can see it soft-deleted). Do you still see "threadid103923" below the thread title?

And also another question (or maybe suggestion). How does the XML sitemap generator deals with tags that have last_use_date = 0 and use_count = 0? Are these tags also included in the sitemap or is the generator clever enough to not include these tags as part of the sitemaps? I'm asking because including those URLs with no content in our sitemaps would be a bad idea if we want to stay friendly with Google.
 
I have created the following test thread: https://xenforo.com/community/threads/testing-something.103930/

It contains a new tag called "threadid103923". Please soft-delete that thread and then reload it (so you can see it soft-deleted). Do you still see "threadid103923" below the thread title?
This was answered in my previous post.

And also another question (or maybe suggestion). How does the XML sitemap generator deals with tags that have last_use_date = 0 and use_count = 0? Are these tags also included in the sitemap or is the generator clever enough to not include these tags as part of the sitemaps? I'm asking because including those URLs with no content in our sitemaps would be a bad idea if we want to stay friendly with Google.
The last_use_date is mostly irrelevant. We do only add tags to the sitemap with a user_count > 0 though.
 
Thanks for the info.

Please feel free to move this out of the bug reports node if/when you consider it appropriate.

All the best,
Super120
 
Top Bottom