[wp-trac] [WordPress Trac] #53313: Widgets REST API: Deleted widgets re-appear after accessing old widgets screen

WordPress Trac noreply at wordpress.org
Tue Jun 1 01:32:34 UTC 2021


#53313: Widgets REST API: Deleted widgets re-appear after accessing old widgets
screen
--------------------------+------------------------
 Reporter:  noisysocks    |      Owner:  noisysocks
     Type:  defect (bug)  |     Status:  assigned
 Priority:  normal        |  Milestone:  5.8
Component:  REST API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+------------------------
 From https://github.com/WordPress/gutenberg/issues/31575.

 ## Description

 The REST API endpoint for deleting widgets does not seem to properly
 delete widgets.

 ## Step-by-step reproduction instructions

 For making REST API requests, I use https://httpie.io and have the Basic
 Auth WordPress plugin installed, but use whatever suits you.

 1. Install the Classic Widgets plugin.
 2. Navigate to `wp-admin/widgets.php`.
 3. Add a widget.
 4. Find the widget's ID by hitting `GET /wp-json/wp/v2/widgets`.
 5. Delete the widget by hitting `DELETE /wp-
 json/wp/v2/widgets/{id}?force=1`.
 6. Hit `GET /wp-json/wp/v2/widgets`. Notice the widget is gone.
 7. Navigate again to `wp-admin/widgets.php`. Notice the widget appears in
 Inactive widgets.
 8. Hit `GET /wp-json/wp/v2/widgets`. Notice the widget appears again.

 ## Expected behaviour

 The widget should not appear in steps 6 and 7.

 ## Actual behaviour

 The widget re-appears.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53313>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list