Skip to content

Legacy widget: Text widget results in javascript error #33203

Closed
@spacedmonkey

Description

@spacedmonkey

Description

The legacy text widget, use the tinymce error. If you have a text widget from the old widget editor then go to the new widget screen, this generates a javascript error.

TypeError: wp.editor.initialize is not a function
    at buildEditor (text-widgets.js?ver=5.7.2:265)
    at n.initializeEditor (text-widgets.js?ver=5.7.2:359)
    at renderWhenAnimationDone (text-widgets.js?ver=5.7.2:434)
    at HTMLDocument.handleWidgetAdded (text-widgets.js?ver=5.7.2:437)
    at HTMLDocument.dispatch (jquery.js?ver=3.5.1:5429)
    at HTMLDocument.elemData.handle (jquery.js?ver=3.5.1:5233)
    at Object.trigger (jquery.js?ver=3.5.1:8715)
    at HTMLDocument.<anonymous> (jquery.js?ver=3.5.1:8793)
    at Function.each (jquery.js?ver=3.5.1:381)
    at jQuery.fn.init.each (jquery.js?ver=3.5.1:203)

Step-by-step reproduction instructions

  1. Activate classic widgets plugins.
  2. Insert text widget
  3. Add some text to widget.
  4. Deactivate classic widgets plugins.
  5. Go to widget screen.
  6. See error.

Expected behaviour

No error message and the tinymce editor should be displayed.

Actual behaviour

Screenshots or screen recording (optional)

Screenshot 2021-07-05 at 17 12 36

Code snippet (optional)

WordPress information

  • WordPress version:
  • Gutenberg version:
  • Are all plugins except Gutenberg deactivated?
  • Are you using a default theme (e.g. Twenty Twenty-One)?

Device information

  • Device:
  • Operating system:
  • Browser:

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Legacy WidgetAffects the Legacy Widget Block - used for displaying Classic Widgets[Feature] Widgets ScreenThe block-based screen that replaced widgets.php.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions