Skip to content

Pattern consist of multiple patterns working fine but failed to display or load in patterns dashboard #38952

Closed

Description

@randhirexpresstech

Description

Register a pattern consist of multiple patterns doesn't display or load in patterns dashboard. However, insertion of same pattern in pages is working fine i.e. getting all blocks
Please check screen-cast pattern-consist-of-multiple-patterns-working-fine-but-failed-to-display-or-load-in-patterns-dashboard

Step-by-step reproduction instructions

  1. Download and install Twenty Twenty-Two theme
  2. Open theme folder in any code editor and go to inc folder >block-patterns.php file
  3. Register a block pattern which consist of multiple patterns at the end of all registered patterns as shown in screen-cast
  4. Go to admin dashboard > pages> add new page > open block inserter > patterns > explore
  5. Check the new registered pattern. It will display the area of new registered pattern but not display the content
  6. Inset the pattern and check if all blocks inserted or not
  7. Publish the page

Screenshots, screen recording, code snippet

Please check screen-cast pattern-consist-of-multiple-patterns-working-fine-but-failed-to-display-or-load-in-patterns-dashboard

Environment info

WordPress version 5.9
Twenty Twenty-Two theme version 1.0
Gutenberg plugin version 12.6.0

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. annezazu commented on Feb 21, 2022

    @annezazu
    Contributor

    Register a block pattern which consist of multiple patterns at the end of all registered patterns as shown in screen-cast

    Can you share more about why you're trying to do this? I imagine this is expected to not work since the pattern directory is only meant to show individual patterns :)

  2. added
    [Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced
    [Type] Help RequestHelp with setup, implementation, or "How do I?" questions.
    on Feb 21, 2022
  3. randhirexpresstech commented on Feb 22, 2022

    @randhirexpresstech
    ContributorAuthor

    I am trying to create meaningful page patterns for admin to use like home-page, about-page etc with the help of multiple patterns so that admin can able to create pages for website using single pattern (which consist of multiple patterns) on single click. These patterns are working fine too except issue of loading pattern in pattern popup
    I am trying to reuse registered patterns or creating nested patterns to avoid repetition of code and provide beautiful designs to admin for use.
    A group of small individual patterns can create a beautiful design.

  4. annezazu commented on Feb 22, 2022

    @annezazu
    Contributor

    Ah ha gotcha. Full page patterns are still being explored currently: #38787 You can see more around building with patterns in general here: #38529

    I'm not quite sure if what you're describing is supported yet/a best practice, which is likely why you're running into this problem. What happens if, when registering, in the content you copy/paste the full HTML rather than referencing the patterns themselves? I might lean on that method for now. I'll keep this open in case others have any thoughts though as I would image this could be something folks would want to be able to lean on in the future.

  5. randhirexpresstech commented on Feb 22, 2022

    @randhirexpresstech
    ContributorAuthor

    If, we registering, in the content copy/paste the full HTML rather than referencing the patterns there then it's just a repetition of the same code and in future, if we will have to correct or change something in patterns then we will have to do this in multiple places which is not a good code practice.
    I think, reusability of patterns is the best, optimized and fastest way to implement this kind of feature.

  6. tellthemachines commented on Oct 21, 2022

    @tellthemachines
    Contributor

    Hi @randhirexpresstech ! Full-page patterns should now be possible with #40034. Can you confirm so we can close this issue?

  7. randhirexpresstech commented on Oct 21, 2022

    @randhirexpresstech
    ContributorAuthor

    Hi @randhirexpresstech ! Full-page patterns should now be possible with #40034. Can you confirm so we can close this issue?

    Thanks @tellthemachines. Issue still exists, pattern consist of multiple patterns doesn't display or load in patterns dashboard. Please check screen-cast
    Theme: Twenty Twenty-Two
    Theme Version: 1.2
    Wordpress Version: 6.0.3

  8. ntsekouras commented on Jan 30, 2023

    @ntsekouras
    Contributor

    Hey @randhirexpresstech! Is this still an issue after: #44784?

  9. randhirexpresstech commented on Jan 31, 2023

    @randhirexpresstech
    ContributorAuthor

    Thanks @ntsekouras. Issue has been resolved now.

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] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] Help RequestHelp with setup, implementation, or "How do I?" questions.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions