[wp-trac] [WordPress Trac] #56819: inline-edit-post.js looks up page author name incorrectly when author no longer has edit capabilities

WordPress Trac noreply at wordpress.org
Sat Oct 15 12:05:42 UTC 2022


#56819: inline-edit-post.js looks up page author name incorrectly when author no
longer has edit capabilities
-----------------------------+---------------------------------------------
 Reporter:  OllieJones       |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  6.2
Component:  Quick/Bulk Edit  |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  ui, javascript, administration
  needs-testing              |
-----------------------------+---------------------------------------------

Comment (by OllieJones):

 I just checked the WooCommerce All Products panel in devtools.  It has the
 same HTML structure, in this respect, as the All Posts and All Pages
 panels. The posts (whether they are user-visible posts, pages, or in this
 case products) are shown like this.

 {{{
 <tbody id='the-list'>
   <tr id="post-123" class="a whole mess of classes" data-id="123>
      lots of columns about wp_posts.ID 123
   </tr>
   <tr id="post-125" class="a whole mess of classes" data-id="125>
      lots of columns about wp_posts.ID 124
   </tr>
   <tr id="post-126" class="a whole mess of classes" data-id="126>
      lots of columns about wp_posts.ID 126
   </tr>
   more rows of data
 </tbody>
 }}}

 The code I propose to repair looks for `id="page-123"` or
 `id="product-123"` rather than `id="post-123"` on All Pages or All
 Products panels, when populating the author field.  Testing with
 WooCommerce won't test the fix because its Quick Edit function doesn't
 present the `label.inline-edit-author select` dropdown for changing
 authors.

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


More information about the wp-trac mailing list