Making WordPress.org

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#2605 closed defect (bug) (fixed)

post_modified gets bumped when plugin status is updated from within wp-admin

Reported by: dd32's profile dd32 Owned by:
Milestone: Plugin Directory v3.0 Priority: high
Component: Plugin Directory Keywords:
Cc:

Description

The post_modified / last_updated property of plugins gets bumped when you modify a plugin from within wp-admin - for example, closing the plugin.

Change History (8)

#1 @joyously
7 years ago

That seems like a correct consequence.

#2 @Otto42
7 years ago

Closing and reopening a plugin, or adjusting some details to it like committers, doesn't update the plugin itself. That should be controlled by the behavior of the SVN commits, not administrative tasks.

#3 @Ipstenu
7 years ago

HOWEVER approving a plugin should change the update date :D Or at least it should change the publish date to 'now' instead of the date it was submitted so https://wordpress.org/plugins/browse/new/ shows the right data.

#4 @dd32
7 years ago

HOWEVER approving a plugin should change the update date :D Or at least it should change the publish date to 'now' instead of the date it was submitted so https://wordpress.org/plugins/browse/new/ shows the right data.

That actually raises a different bug than the one seen here :)
/browse/new/ is ordered by post_date which will always be the submit date at present, not post_modified which this ticket is specifically about.

My assumption here is that we need to store the submitted date as meta, for future use, and store the approval date as post_date instead.

#5 @dd32
7 years ago

In 5316:

Plugin Directory: The plugin post_type's post_modified date should only ever be changed in response to a SVN action, and not just because wp_update_post() was called.
This moves the code responsible for handling this special case from the plugin importer to globally affecting the site.

See #2605

#6 @dd32
7 years ago

In 5317:

Plugin Directory: The 'post_date' of plugins should be set to the date which they first become active, this is when the plugin moves from approved to publish.
This ensures that the /browse/new view has the correct data.

See #2605

#7 @dd32
7 years ago

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

Everything mentioned here should now be fixed.

#8 @ocean90
7 years ago

In 6592:

Plugin Directory: Pass post_date and post_modified to wp_insert_post() when creating a new plugin post.

Prevents an invalid post_modified value due to the Plugin_Directory::filter_wp_insert_post_data() filter.

See #2605.
Fixes #3443.

Note: See TracTickets for help on using tickets.