[wp-trac] [WordPress Trac] #38221: Incorrect page id/name search blocks future searches

WordPress Trac noreply at wordpress.org
Wed Jun 24 00:09:08 UTC 2020


#38221: Incorrect page id/name search blocks future searches
----------------------------------+----------------------------------------
 Reporter:  bencroskery           |       Owner:  tomdude
     Type:  defect (bug)          |      Status:  assigned
 Priority:  normal                |   Milestone:  5.5
Component:  Media                 |     Version:  4.4.2
 Severity:  normal                |  Resolution:
 Keywords:  has-patch 2nd-        |     Focuses:  accessibility, javascript
  opinion                         |
----------------------------------+----------------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:9 afercia]:
 > Thanks for the patches. Looking a bit into this, I'm not sure I
 understand what is the scenario where, using the admin interface,
 parameters like `?p=123` or `?name=noexist` get added to the query string.
 Maybe I'm missing something but I couldn't find such a case.

 I also could not find such a case. Thinking about it, I went back and
 forth for a bit between trying to fix it and closing as wontfix, since
 adding arbitrary parameter to the URL doesn't seem like a common use case.

 That said, I think the `is_singular()` check can be removed here:

 * The instance in `class-wp-posts-list-table.php` was added in [7247].
 * The instance in `class-wp-media-list-table.php` was added in [7251].

 As far as I can tell, both instances are now redundant and don't serve any
 purpose:

 * `wp-admin/edit.php?p=123` redirects to `wp-admin/edit-
 comments.php?p=123`
 * `wp-admin/upload.php?p=123` displays a single media item (assuming the
 ID exists), but without the filter.

 I think it would make sense to always show the filter here, regardless of
 the `is_singular()` check.

 See [attachment:"38221.3.diff"].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/38221#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list