Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation: Create new Menu produces a warning in the console stating misuse of refs #68572

Open
3 of 6 tasks
yogeshbhutkar opened this issue Jan 9, 2025 · 1 comment · May be fixed by #68578
Open
3 of 6 tasks

Navigation: Create new Menu produces a warning in the console stating misuse of refs #68572

yogeshbhutkar opened this issue Jan 9, 2025 · 1 comment · May be fixed by #68578
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@yogeshbhutkar
Copy link
Contributor

Description

Creating a new menu from the Block Panel of the Navigation block currently triggers a warning: Function components cannot be given refs in the developer console. Ideally, this action should not produce any warnings.

I tried searching for existing issues but was not able to find any. If it is felt that this issue is duplicated, please feel free to close it.

Step-by-step reproduction instructions

  1. Navigate to site-editor page.
  2. Add a Navigation block.
  3. Go to its Block Panel.
  4. Click on the three dots.
  5. Click on Create new Menu.

Screenshots, screen recording, code snippet

Screen.Recording.2025-01-09.at.6.49.29.PM.mov

Environment info

  • WordPress Version: 6.8-alpha-59361
  • Gutenberg Version: Trunk (f91339e)
  • OS: macOS Sequoia

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@yogeshbhutkar yogeshbhutkar added the [Type] Bug An existing feature does not function as intended label Jan 9, 2025
@Mayank-Tripathi32
Copy link
Contributor

Mayank-Tripathi32 commented Jan 9, 2025

@yogeshbhutkar Thanks for reporting this issue. I was able to replicate it on the trunk branch within the site editor. However, I couldn't reproduce the same warning in the post editor, as no warning was logged in the console there.

I will work on fixing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants