WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 14 months ago

#15309 closed enhancement (worksforme)

Updating Attachments will always set post_modified[_gmt] to the post_date[_gmt]

Reported by: shawnparker Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Media Keywords: reporter-feedback
Focuses: Cc:

Description

When updating an attachment the post_modified and post_modified_gmt are always set to post_date and post_date_gmt respectively.

Is there a specific reason for this or can we allow attachments to properly set a modified time?

Attached is a proposed patch (which just copies code directly from wp_insert_post).

Attachments (1)

att-mod-time-patch.diff (684 bytes) - added by shawnparker 5 years ago.
mod for allowing updated attachments to update the post_modified time

Download all attachments as: .zip

Change History (7)

@shawnparker5 years ago

mod for allowing updated attachments to update the post_modified time

comment:1 @nacin5 years ago

  • Keywords has-patch added; attachment update post_date removed
  • Milestone changed from Awaiting Review to Future Release
  • Type changed from defect (bug) to enhancement

comment:2 @christopherross3 years ago

Nacin,

Is there anyway this can be pushed into the next release for WordPress.com? We have a VIP project that requires sorting by media modification date and this looks like the best way to accomplish it. If there's anyway to get it in there, it would be a huge benefit.

Chris

comment:3 @danielbachhuber3 years ago

  • Cc wordpress@… added

comment:4 @dd323 years ago

Is there anyway this can be pushed into the next release for WordPress.com? We have a VIP project that requires sorting by media modification date and this looks like the best way to accomplish it.

WordPress.org and WordPress.com are separate entities, WordPress.com can choose to add this patch to their codebase without anything happening on the .org side, however this isn't the place to discuss that, I'd suggest you get in touch with the VIP team and work out a solution in conjunction with them.

comment:5 @ericlewis16 months ago

  • Keywords reporter-feedback added; has-patch removed

Cannot reproduce on trunk, OP can you?

comment:6 @wonderboymusic14 months ago

  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This does not happen for sure since [28788].

Note: See TracTickets for help on using tickets.