[wp-meta] [Making WordPress.org] #2787: Plugin Directory: Reject plugin on duplicate slugs

Making WordPress.org noreply at wordpress.org
Wed May 3 22:35:18 UTC 2017


#2787: Plugin Directory: Reject plugin on duplicate slugs
------------------------------+-------------------------
 Reporter:  Ipstenu           |       Owner:  tellyworth
     Type:  defect            |      Status:  reopened
 Priority:  normal            |   Milestone:
Component:  Plugin Directory  |  Resolution:
 Keywords:  has-patch         |
------------------------------+-------------------------

Comment (by SergeyBiryukov):

 Nevermind, reproduced with a newly submitted plugin (previously tried with
 a published one).

 It's the same issue that was mentioned in comment:4:ticket:2594.


 [source:sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-
 directory/class-plugin-directory.php?rev=5463&marks=1164#L1160
 Plugin_Directory::get_plugin_post()] includes a list of 7 plugin statuses
 to query: `'publish', 'pending', 'disabled', 'closed', 'new', 'draft',
 'approved'`, but [source:sites/trunk/wordpress.org/public_html/wp-
 content/plugins/plugin-directory/class-plugin-
 directory.php?rev=5463&marks=758#L755 Plugin_Directory::pre_get_posts()]
 overrides that list and limits the query to 4 statuses `'approved',
 'publish', 'closed', 'disabled'` (note that lack of `'new'`).

 Adding `! $wp_query->is_main_query()` to
 `Plugin_Directory::pre_get_posts()`, as in
 attachment:2594.3.patch:ticket:2594, fixes the issue.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2787#comment:7>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list