Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3180 closed defect (bug) (fixed)

Plugin Directory Admin: Rejecting a plugin with an existing name causes weird errors

Reported by: ipstenu's profile Ipstenu Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: Plugin Directory Keywords:


When a plugin is rejected its slug is changed from plugin-name to rejected-plugin-name-rejected

The problem is that people could submit the SAME plugin name again and get the slug plugin-name, which when rejected would be rejected-plugin-name-rejected ... again

This throws an error telling you that the name is already in use. If you go back and refresh the post, there is no more slug to edit and the name is kind of messed up.

In the case of REJECTED plugins, we shouldn't use the same if-name-exists check, and instead allow appending of a -2 as needed.

Change History (4)

#1 @Otto42
7 years ago

This used to work and would add the -2 correctly, I thought. Might be worth looking at the changes to see when this broke.

#2 @SergeyBiryukov
7 years ago

In 5996:

Plugin Directory: Make sure that Status_Transitions::approved() and ::rejected() only run on status change, not on subsequent edits.

See #3180.

#3 @SergeyBiryukov
7 years ago

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

In 5997:

Plugin Directory: When rejecting a plugin, disable the check for existing slugs added in [5727], and let wp_unique_post_slug() do its job.

Fixes #3180.

This ticket was mentioned in Slack in #meta by sergey. View the logs.

7 years ago

Note: See TracTickets for help on using tickets.