[wp-trac] [WordPress Trac] #57531: Store legacy sidebars when switching to a block theme

WordPress Trac noreply at wordpress.org
Wed Feb 1 23:03:59 UTC 2023


#57531: Store legacy sidebars when switching to a block theme
-------------------------------------------------+-------------------------
 Reporter:  Mamaduka                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.2
Component:  Widgets                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch gutenberg-merge has-       |     Focuses:
  testing-info                                   |
-------------------------------------------------+-------------------------

Comment (by ironprogrammer):

 == Test Report
 Patch tested: https://github.com/WordPress/wordpress-develop/pull/3893
 👍🏻

 === Environment
 - Hardware: MacBook Pro Apple M1 Pro
 - OS: macOS 12.6.2
 - Browser: Safari 16.2, Postman 10.9.1
 - Server: nginx/1.23.3
 - PHP: 7.4.33
 - WordPress: 6.2-alpha-54642-src
 - Theme: twentytwenty v2.1, twentytwentythree v1.0, twentytwentytwo v1.3

 === Actual Results
 - ✅ With block theme enabled, API request to `/wp-
 json/wp/v2/sidebars?context=edit&_fields=id,name,description,status,widgets`
 includes previously registered classic theme widgets, with status
 `inactive`.

 === Additional Notes
 - API tests conducted with Postman, using `Cookie` and `X-WP-Nonce`
 headers scraped from XHR requests logged in as admin.

 === Supplemental Artifacts
 ''Twenty Twenty Theme: API request **before** patch -- `sidebar-1` and
 `sidebar-2` are `active`:''
 {{{
 #!json
 [
     {
         "id": "wp_inactive_widgets",
         "name": "Inactive widgets",
         "description": "",
         "status": "inactive",
         "widgets": []
     },
     {
         "id": "sidebar-1",
         "name": "Footer #1",
         "description": "Widgets in this area will be displayed in the
 first column in the footer.",
         "status": "active",
         "widgets": [
             "block-2",
             "block-3",
             "block-4",
             "block-5",
             "block-6"
         ]
     },
     {
         "id": "sidebar-2",
         "name": "Footer #2",
         "description": "Widgets in this area will be displayed in the
 second column in the footer.",
         "status": "active",
         "widgets": []
     }
 ]
 }}}

 ''Twenty Twenty-Three Theme: API request **before** patch -- `sidebar-1`
 and `sidebar-2` are missing:''
 {{{
 #!json
 [
     {
         "id": "wp_inactive_widgets",
         "name": "Inactive widgets",
         "description": "",
         "status": "inactive",
         "widgets": []
     }
 ]
 }}}

 ''Twenty Twenty-Three Theme: API request **AFTER** patch -- `sidebar-1`
 and `sidebar-2` are returned and `inactive` ✅:''
 {{{
 #!json
 [
     {
         "id": "wp_inactive_widgets",
         "name": "Inactive widgets",
         "description": "",
         "status": "inactive",
         "widgets": []
     },
     {
         "id": "sidebar-1",
         "name": "Footer #1",
         "description": "Widgets in this area will be displayed in the
 first column in the footer.",
         "status": "inactive",
         "widgets": [
             "block-2",
             "block-3",
             "block-4",
             "block-5",
             "block-6"
         ]
     },
     {
         "id": "sidebar-2",
         "name": "Footer #2",
         "description": "Widgets in this area will be displayed in the
 second column in the footer.",
         "status": "inactive",
         "widgets": []
     }
 ]
 }}}

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


More information about the wp-trac mailing list