Skip to content

Get a warning when I set define( 'SCRIPT_DEBUG', true );. #35627

@chiilog

Description

@chiilog

Description

When I set define( 'SCRIPT_DEBUG', true ); in wp-config.php, if I insert a block with a slash, I get a warning in the console. Note that the block will be displayed correctly.

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.

If I insert a block from Toggle block inserter, the warning will not be displayed.

Step-by-step reproduction instructions

  1. Set define( 'SCRIPT_DEBUG', true ); in wp-config.php
  2. Open the developer tools in your browser.
  3. Go to /wp-admin/
  4. Go to the Add New page.
  5. Click on editor content.
  6. Type /heading.
  7. Finally. You can see the following error in the developer tools.
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
    in ForwardRef(RichTextWrapper) (created by ParagraphBlock)
    in ParagraphBlock (created by edit_Edit)
    in edit_Edit (created by WithToolbarControls(edit_Edit))
...

Screenshots, screen recording, code snippet

20211014190053

Environment info

  • WordPress 5.8.1
    • I have not installed the Gutenberg plugin.
  • macOS Big Sur 11.6
  • Google Chrome 94.0.4606.81

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions