[wp-trac] [WordPress Trac] #65045: Duplicate 'Comment' entry in trashableTypes array in wp/api.js

WordPress Trac noreply at wordpress.org
Thu Apr 9 08:10:57 UTC 2026


#65045: Duplicate 'Comment' entry in trashableTypes array in wp/api.js
-------------------------+-------------------------------------------------
 Reporter:               |       Owner:  (none)
  baikare.sandeep007     |
     Type:  defect       |      Status:  new
  (bug)                  |
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  REST API     |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  javascript, rest-api, coding-
                         |  standards
-------------------------+-------------------------------------------------

Comment (by gaurangsondagar):

 Tested patch: https://core.trac.wordpress.org/attachment/ticket/65045
 /trashable-types-fix.patch

 Steps I followed:
 - Located the 'trashableTypes' array in 'wp/api.js' and confirmed the
 duplicate 'Comment' entry.
 - Applied the patch and verified the duplicate entry has been removed.
 - Tested comment trash, restore, and delete actions from the admin panel.
 - Confirmed no JavaScript errors and no regressions in functionality.

 Environment:
 - WordPress: 7.1-alpha-62161-src
 - PHP: 8.3.30
 - Browser: Chrome
 - Database: MySQL 8.4.8
 - OS: Ubuntu

 As this is a minor code duplication issue with no visible UI impact, the
 fix improves code clarity without affecting behavior.

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


More information about the wp-trac mailing list