Skip to:

Opened 14 years ago

Closed 13 years ago

Last modified 11 years ago

#2546 closed defect (bug) (fixed)

Publishing a previous draft shows draft date

Reported by: thekmen's profile thekmen Owned by:
Milestone: 1.5 Priority: normal
Severity: normal Version:
Component: Blogs Keywords: dev-feedback


I just puublished a post that had been in draft mode for a few days.
When viewing the activity stream, the new post has the date of the original draft so gets pushed way back on the activity stream.

Change History (7)

#1 @thekmen
14 years ago

Just spotted this changeset: - maybe it fixes this issue?

#2 @johnjamesjacoby
14 years ago

Probably more a problem with how we are hooking into the blog post process. Will take a look.

#3 @boonebgorges
13 years ago

  • Component changed from Core to Blogs
  • Keywords dev-feedback added

bp_blogs_record_post() creates an activity item using $post->post_date_gmt, which does not recognize when a draft is published.

We could change it to post_modified_gmt, but this opens the possibility of people abusing the activity stream by publishing/unpublishing posts in order to bump them up.

I don't think this is a serious concern - on balance, it seems better to me to use post_modified_gmt rather than post_date_gmt - but I would like a second opinion before making the change.

#4 @boonebgorges
13 years ago

Actually, maybe it's better if we just hook to 'publish_post' rather than 'save_post'. Thoughts?

#5 @boonebgorges
13 years ago

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

(In [4116]) Changes blog post activity timestamp to post_modified date to better mirror editing and draft dates. Fixes #2546

#6 @johnjamesjacoby
11 years ago

  • Severity set to normal

Note: The 'save_post' hook is a catch all, and sucks because it's used everywhere, even in navigation menus. The sooner we can get off of it and use 'transition_post_status' style actions, the better.

#7 @boonebgorges
11 years ago

In 7577:

Publish blog posts to the activity stream based on transition_post_status

BP has historically had problems when posting certain kinds of blog posts to
the activity stream, such as improper bumping for post edits and incorrect
timestamps for scheduled posts. These problems stem from the fact that
bp_blogs_record_post has been hooked to the generic 'save_post'. Using
'transition_post_status' instead allows BP to prevent edit-bumps, while
allowing bp_blogs_record_post() to use post_date_gmt for activity timestamps
(thereby properly attributing scheduled posts).

See #3746, #2546.

Fixes #4090

Note: See TracTickets for help on using tickets.