Skip to content

Custom Pattern: Each time you switch pattern categories, the number of custom patterns increases #51872

Closed

Description

@t-hamano

Description

It is a strange behavior, but every time I switch categories in the main inserter, the number of registered custom patterns increases. This problem appears to occur when multiple custom patterns are registered. Also, I don't think this is the intended behavior, but the custom patterns appear in all categories.

Step-by-step reproduction instructions

  • Register two patterns with Synced turned off from the Library menu in the Site Editor.
  • Open the main block inserter.
  • Click Patterns tab.
  • Click Custom patterns category.
  • Two patterns should appear correctly.
  • Switch to other categories.
  • One custom pattern is added.
  • Return to Custom patterns category.
  • The number of custom patterns increases to three.
  • Repeat to switch categories.
  • Each iteration should increase the number of custom patterns.

Screenshots, screen recording, code snippet

c22f1fcfc097fa80150a073597e14f6f.mp4

Environment info

No response

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

Activity

  1. added
    [Type] Bug
    [Feature] Inserter
    [Feature] Patterns
    on Jun 25, 2023
  2. glendaviesnz commented on Jun 25, 2023

    @glendaviesnz
    Contributor

    This PR seems to also fix this issue. Can you please test against that PR @t-hamano and confirm?

  3. moved this from ❓ Triage to 🏗️ In Progress in WordPress 6.3.x Editor Taskson Jun 26, 2023
  4. talldan commented on Jun 28, 2023

    @talldan
    Contributor

    Fixed by #51947

  5. moved this from 🏗️ In Progress to ✅ Done in WordPress 6.3.x Editor Taskson Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] Inserter[Feature] Patterns[Type] Bug

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions