WordPress / WordPress/pattern-directory

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

Open
#728 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
134
Forks
46
Avg merge
9h 4m
Merged PRs (30d)
19

Description

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)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce both interactions on the Pattern Creator page in Chrome: use the “Browse all” button, then open the inserter with + and close it with X. Start at the reported onClick location in index.js:73:23, and verify that Browse all opens the block panel while closing it produces no console error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.