Skip to:
Content

bbPress.org

Opened 5 years ago

Closed 5 years ago

#2585 closed enhancement (fixed)

Importers should use reply id for post name (slug)

Reported by: netweb Owned by: netweb
Milestone: 2.6 Priority: normal
Severity: normal Version: trunk
Component: API - Importers Keywords: has-patch
Cc:

Description

Until now, replies to topics have always shared the topic title (and incremental slugs) in common with each other. With this change, replies will now mostly be identified via their post ID. This helps with search results, and avoids some reply-slug confusion as to why they need to have titles or slugs at all.

Importers should also reflect that change implemented via #2291/r5117

Attachments (2)

2585.diff (19.9 KB) - added by netweb 5 years ago.
2585.2.diff (26.8 KB) - added by netweb 5 years ago.

Download all attachments as: .zip

Change History (5)

@netweb
5 years ago

#1 @netweb
5 years ago

  • Keywords needs-testing 2nd-opinion added

@netweb
5 years ago

#2 @netweb
5 years ago

  • Keywords needs-testing 2nd-opinion removed

In 2585.2.diff​:

  • Removed post_title and post_name from each importer.

By not supplying wp_insert_post a post_title or post_name field for each imported reply the end result is each reply has no post_title and the post_name will be the same as the wp_posts.id mimicking the same default wp_posts behaviour for creating a reply manually in bbPress.

Below table shows ID=42324 a 'standard reply' manually created in bbPress vs ID=42359 a phpBB imported reply.

IDpost_authorpost_date post_date_gmt post_contentpost_titlepost_excerptpost_statuscomment_statusping_statuspost_passwordpost_nameto_pingpingedpost_modifiedpost_modified_gmtpost_content_filteredpost_parentguidmenu_orderpost_typepost_mime_typecomment_count
423241 2014-04-16 10:08:052014-04-16 06:08:05qwerty publish closed open 42324 2014-04-16 10:08:052014-04-16 06:08:0542207http://develop.wp.nw/forums/reply/42324/1reply 0
42359 55 2012-11-27 05:29:112012-11-27 05:29:11lorem ipsum. publish closed closed 42359 2012-11-27 05:29:112012-11-27 05:29:1142351http://develop.wp.nw/forums/reply/42359/0reply 0

#3 @netweb
5 years ago

  • Owner set to netweb
  • Resolution set to fixed
  • Status changed from new to closed

In 5349:

Replies now use the reply ID for the the post name/slug via r5117.
bbPress' importers should also reflect that change with the removal of 'Reply Title' (post_title), 'Reply Slug' (post_name) and callback_reply_title from all importers. Props netweb. Fixes #2585

Note: See TracTickets for help on using tickets.