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

Warning after inserting a Gallery into an empty post #52362

Closed
Mamaduka opened this issue Jul 6, 2023 · 1 comment
Closed

Warning after inserting a Gallery into an empty post #52362

Mamaduka opened this issue Jul 6, 2023 · 1 comment
Labels
[Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P [Type] Bug An existing feature does not function as intended

Comments

@Mamaduka
Copy link
Member

Mamaduka commented Jul 6, 2023

Description

The following React warning is logged in the console after inserting a Gallery into an empty post. The gallery should be the only block in a post.

Based on the trace, this might be related to recent changes introduced for the Footnotes feature #51201.

cc @ellatrix

Warning: Each child in a list should have a unique "key" prop.

Check the top-level render call using <figure>. See https://reactjs.org/link/warning-keys for more information.
    at figure

Step-by-step reproduction instructions

  1. Create a new post.
  2. Insert Gallery block.
  3. Select images from the media library and create a Gallery.
  4. The warning should be logged in the console.

There are a few other ways to reproduce the warning. See the screencast for another one.

Screenshots, screen recording, code snippet

CleanShot 2023-07-06 at 12 42 12

CleanShot.2023-07-06.at.12.53.46.mp4

Environment info

  • WP 6.2, Gutenberg latest trunk
  • Chrome, MacOS

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

@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P labels Jul 6, 2023
@annezazu annezazu moved this to ❓ Triage in WordPress 6.3.x Editor Tasks Jul 6, 2023
@t-hamano
Copy link
Contributor

I was able to reproduce the same issue shortly after this issue was submitted. With the latest trunk, I could not reproduce this issue. I think #52241 probably solved the problem because the getRichTextValues that appear in the trace changed in #52241.

Therefore, I would like to close this issue.

@github-project-automation github-project-automation bot moved this from ❓ Triage to ✅ Done in WordPress 6.3.x Editor Tasks Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

No branches or pull requests

2 participants