WordPress.org

Making WordPress.org

Opened 2 months ago

Last modified 4 days ago

#5344 new defect

Delete stale, orphaned topic tags

Reported by: jonoaldersonwp Owned by:
Milestone: Priority: low
Component: Support Forums Keywords: seo
Cc:

Description (last modified by jonoaldersonwp)

Topic tags which have only one related posts, where that member was created more than a year days ago, should be either consolidated into related/similar tags, or when there's no suitable candidate for consolidation, deleted (and a 410 status returned).

To facilitate the unavoidably manual process of consolidation, would it be possible to expose a list of URLs of tags which meet this criteria?

E.g., https://wordpress.org/support/topic-tag/_765258526/

Attachments (2)

5344-limit-topic-creation.patch (1.8 KB) - added by Clorith 5 days ago.
5344-limit-topic-creation.2.patch (3.7 KB) - added by Clorith 4 days ago.

Download all attachments as: .zip

Change History (11)

#1 @jonoaldersonwp
2 months ago

  • Description modified (diff)

#2 @Clorith
2 months ago

I have said list and started work on a quick script to find similarities and consolidation for the tags so we can merge / remove them.

But I wanted a proper solution for tags before doing that work fully, fix the cause first, then the symptom or it'll get out of hand again (there's currently close to 600k tags)

This ticket was mentioned in Slack in #meta by jonoaldersonwp. View the logs.


2 months ago

This ticket was mentioned in Slack in #forums by yui. View the logs.


2 months ago

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


5 days ago

#6 @Clorith
5 days ago

5344-limit-topic-creation.patch is the first step in resolving this.

It will limit the creation of new topic tags to moderators or above (this can be further refined if needed, but seems like the natural point).

This means the tag field remains as it is while we work on shortening the tags list, but any attempt to write a tag that does not exist is just skipped.

This ticket was mentioned in Slack in #meta by clorith. View the logs.


5 days ago

#8 @Otto42
5 days ago

@Clorith It seems like returning a WP_Error there will abort inserting of all terms after the non-existent one. See https://core.trac.wordpress.org/browser/trunk/src/wp-includes/taxonomy.php#L2602 where the function returns instead of continuing the loop.

#9 @Clorith
4 days ago

Good catch @Otto42, I had of course only tested with new tags coming in last so completely missed that!

5344-limit-topic-creation.2.patch takes a more roundabout way to reach the same goal, I didn't spot any good core way of preventing tag creation, but there's some bbPress filters that could be utilized to achieve what was needed here.

The new topic creation is a bit more involved than previously, I don't think we add any secondary taxonomies, but the approach taken futureproofs it in case we need to (or actually do already), and shouldn't add any noteworthy added overhead with its checks as these are all features that are used otherwise in the process so the responses would be in memory for the request.

Note: See TracTickets for help on using tickets.