Contributors Cannot View Synced Patterns (Patterns), Hindering Content Editing
Currently, users with the Contributor role are unable to see or interact with Synced Patterns (formerly Reusable Blocks, now just "Patterns" in the interface when created by an Editor/Admin) within the block editor. While they might see the rendered content of a pattern on the front end, within the editor, the pattern block either appears as a missing/empty block or simply doesn't render its contents for the Contributor.
This makes it extremely difficult, if not impossible, for Contributors to effectively edit posts or pages that utilize these patterns. They cannot see the context of the surrounding content that is part of a pattern, leading to confusion, potential for breaking layouts, and an inefficient editing workflow.
For example, if an Editor creates a complex call-to-action section as a Pattern and inserts it into a post, a Contributor assigned to edit the surrounding text in that post won't be able to see what that call-to-action looks like or where its boundaries are within the editor.
Impact:
Poor User Experience for Contributors: Contributors are essentially editing "blind" around these patterns. Inefficient Workflow: Editors or Admins often need to intervene or provide screenshots, slowing down the content creation process. Risk of Content Errors: Without being able to see the pattern's content, Contributors might inadvertently add redundant information or create formatting issues.
Suggested Solution:
While it's understandable that Contributors should not be able to edit the structure or content of a (synced) Pattern itself (as this is typically a design/administrative decision), they critically need to be able to view the pattern's content within the editor.
One potential solution could be to: Allow Contributors to visually render the content of a Pattern within the block editor, even if it's in a "locked" or read-only state for them. Alternatively, or in addition, consider introducing a new capability specifically for viewing patterns (e.g., view_patterns or read_patterns). This capability could be assigned to roles like Contributor by default, without granting them edit_patterns capabilities.
Steps to Reproduce:
Log in as an Editor or Administrator. Create a new Synced Pattern (e.g., a few paragraphs of text with specific formatting or a group of blocks). Insert this Pattern into a new post. Log out and log in as a user with the Contributor role. Attempt to edit the post created in step 3. Observe that the Contributor cannot see the content of the Pattern within the editor interface.
Expected Behavior:
Contributors should be able to see the content of Synced Patterns within the block editor to understand the full context of the content they are editing.
Actual Behavior:
Contributors cannot see the content of Synced Patterns within the block editor, making it difficult to edit posts containing them.
Thanks for the report. I was able to reproduce the problem, but it's a bit strange.
- Contributor and Author can insert the synced pattern created by Admin and can see the pattern content.
- If they save the post and reload the browser, the pattern content disappears.
- However, when I open the block inserter panel or insert a new block, the pattern content is rendered.
https://github.com/user-attachments/assets/b61292d0-e98c-44f1-9b78-b2cebe8f8567