Skip to content

Block Inserter: "Browse all" button non-functional and close button throws error #728

@igorradovanov

Description

@igorradovanov

Describe the bug

Two related issues on the Pattern Creator page: (1) The "Browse all" button under "Add new block" is non-functional and does nothing when clicked, and (2) When the block inserter is manually opened via the + button and then closed using the X button, a React error is thrown in the console: Uncaught TypeError: t is not a function at onClick (index.js:73:23).

To Reproduce

Steps to reproduce the behavior:

Bug 1 - Non-functional "Browse all" button:

  1. Go to https://wordpress.org/patterns/new-pattern/
  2. Click on the "Browse all" button located under "Add new block (+ button)"
  3. Observe that nothing happens (panel with all blocks does not open)

Bug 2 - Close button throws error:

  1. Go to https://wordpress.org/patterns/new-pattern/
  2. Click on the + (plus) button to manually open the block inserter
  3. Click on the X button to close the block inserter panel
  4. Open Chrome DevTools console
  5. See error: react-dom.min.js?ver=18:1 Uncaught TypeError: t is not a function

Expected behavior

  • The "Browse all" button should open the block inserter panel when clicked
  • The X close button should close the block inserter panel without throwing any JavaScript errors

Screenshots

N/A

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: Latest

Additional context

Full error stack trace:

react-dom.min.js?ver=18:1 Uncaught TypeError: t is not a function
    at onClick (index.js:73:23)
    at n.<computed> (SK3NAZA3.js:47:11)
    at Object.Ga (react-dom.min.js?ver=18:1:105335)
    at B (react-dom.min.js?ver=18:1:10495)
    at W (react-dom.min.js?ver=18:1:10550)
    at qe (react-dom.min.js?ver=18:1:23291)
    at Ke (react-dom.min.js?ver=18:1:23705)
    at react-dom.min.js?ver=18:1:29056
    at pl (react-dom.min.js?ver=18:1:85572)
    at V (react-dom.min.js?ver=18:1:9850)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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