Making WordPress.org

Opened 2 years ago

Last modified 2 years ago

#1880 closed defect

Add redirect for old numeric topic/forum slugs — at Version 2

Reported by: ocean90 Owned by:
Milestone: Priority: normal
Component: International Forums Keywords:

Description (last modified by ocean90)

It seems like bbPress 1.x had a fallback to the topic ID, see https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fja.forums.wordpress.org%2Ftopic%2F and https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fja.forums.wordpress.org%2Fforum%2F

A possible solution:

  • Store the old topic ID in a meta field _old_topic_id
  • In the redirect handler check if the slug of a topic is numeric
  • Query post meta for _old_topic_id
  • If meta exists redirect to new slug (cache result)
  • If it doesn't exist continue with the regular redirect (cache result)

Change History (2)

#1 @jmdodd
2 years ago

I stored the old bbPress 1 topic id as postmeta _bbp_old_topic_id in the bbPress 2 upgraded forum tables.

#2 @ocean90
2 years ago

  • Description modified (diff)
  • Summary changed from Add redirect for old numeric topic slugs to Add redirect for old numeric topic/forum slugs

We need the same for topics. (_bbp_old_forum_id exists too.)

Note: See TracTickets for help on using tickets.