[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
Thu Oct 13 16:31:14 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:  Awaiting Review
Component:  Administration  |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  ui, javascript
----------------------------+------------------------------
Changes (by OllieJones):

 * focuses:  ui, javascript, administration => ui, javascript
 * component:  Quick/Bulk Edit => Administration


Comment:

 [This line](https://github.com/WordPress/wordpress-
 develop/blob/cfe4548fde3b10b6d2a01d7fdd105c990dda1409/src/js/_enqueues/admin
 /inline-edit-post.js#L308):
 {{{
 $(':input[name="post_author"]', editRow).prepend('<option value="' +
 $('.post_author', rowData).text() + '">' + $('#' + t.type + '-' + id + '
 .author').text() + '</option>');
 }}}

 should say

 {{{
  ... $('#post-' + id + ' .author').text()  ...
 }}}


 instead, as the divs always have `id="post-1234"` even on the All Pages
 panel.

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


More information about the wp-trac mailing list