[wp-trac] [WordPress Trac] #39451: Javascript error when link_manager_enabled ( WP_Widget_Links) and theme supports customize-selective-refresh-widgets

WordPress Trac noreply at wordpress.org
Mon May 2 20:04:49 UTC 2022


#39451: Javascript error when link_manager_enabled ( WP_Widget_Links) and theme
supports customize-selective-refresh-widgets
------------------------------+-------------------------
 Reporter:  nikeo             |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  6.0
Component:  Customize         |     Version:  4.5
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  javascript
------------------------------+-------------------------
Changes (by costdev):

 * keywords:  has-patch needs-testing => has-patch commit


Comment:

 == Test Report

 === Environment
 * Server: Apache (Linux)
 * WordPress: 6.0-beta4-53335-src
 * Browser: Chrome 101.0.4951.41
 * OS: Windows 10
 * Theme: Twenty Twenty-One
 * Plugins: None activated.

 === Steps
 1. Save the following to `wp-content/plugins/customize-selective-refresh-
 widgets.php`:
 {{{#!php
 <?php

 /**
  * Plugin Name: customize-selective-refresh-widgets
  * Description: customize-selective-refresh-widgets
  * Author:      WordPress Core Contributors
  * Author URI:  https://make.wordpress.org/core
  * License:     GPLv2 or later
  * Version:     1.0.0
  */

 add_action(
         'after_setup_theme',
         function() {
                 add_filter( 'pre_option_link_manager_enabled',
 '__return_true' );
                 add_theme_support( 'customize-selective-refresh-widgets'
 );
         }
 );
 }}}
 2. Navigate to `Plugins > Installed Plugins`.
 3. Enable the `customize-selective-refresh-widgets` plugin.
 4. Navigate to `Links > Add New`.
 5. Enter a name and a web address. Click `Add Link`.
 6. Navigate to `Appearance > Widgets`.
 7. Add a `Links` widget to the `Footer` sidebar.
 8. Navigate to `Appearance > Customize`.
 9. Open up DevTools. Notice an error: "Uncaught Error: Illegal id for
 widget partial". ✅
 10. Apply
 [https://core.trac.wordpress.org/attachment/ticket/39451/39451.diff
 39451.diff].
 11. Refresh the Customizer page.
 12. Open DevTools. Notice the error is gone. ✅

 === Results
 1. Issue reproduced. ✅
 2. [https://core.trac.wordpress.org/attachment/ticket/39451/39451.diff
 39451.diff] resolves the issue.
 3. No regressions identified.

 === Notes
 1. [https://github.com/WordPress/wordpress-develop/pull/2661 PR 2661] is a
 refreshed version of
 [https://core.trac.wordpress.org/attachment/ticket/39451/39451.diff
 39451.diff] to show that CI passes.
 2. Adding `commit`.

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


More information about the wp-trac mailing list