Inserting a synced pattern from the iOS block inserter adds an unsynced copy

Open Beginner friendly
#884 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
ios, javascript
Domain
frontend, mobile

Research direction

Start with src/components/native-inserter/index.jsx and inspect insertPattern, then compare its behavior with the native inserter's Reusable blocks tab and WP Admin's inserter. Reproduce the steps on iOS with a synced pattern and confirm the inserted block remains linked to its source; the issue is resolved when later edits to the pattern update the inserted block.

Written by the indexing model from the issue text.

Description

[Type] Bug
Description

Synced patterns stay linked to their source, so editing the pattern updates every post that uses it. When a synced pattern is inserted from the Patterns section of the native block inserter on iOS, the editor adds a plain copy of its blocks instead. Later changes to the pattern don't reach the post, and nothing tells the user the link was lost.

The Patterns sheet lists the site's own patterns under "Uncategorized", and doesn't show which ones are synced.

Expected: inserting a synced pattern adds a synced pattern block, as WP Admin's inserter does. The native inserter's "Reusable blocks" tab already does this.

Step-by-step reproduction instructions
  1. Create a synced pattern on the site.
  2. In the iOS editor, open the block inserter, then Patterns, then "Uncategorized".
  3. Tap the synced pattern.
  4. The inserted block is a regular block (e.g. Paragraph), not a Pattern block.
Screenshots, screen recording, code snippet
Additional AI-generated details
  • The native inserter's insertPattern (src/components/native-inserter/index.jsx) always inserts parse( pattern.content ).
  • Suggested fix: for a user pattern (pattern.type === 'user') that isn't unsynced (syncStatus !== 'unsynced'), insert createBlock( 'core/block', { ref: pattern.id } ) instead, as core's inserter does. Optionally, pass the sync status to the native sheet so it can mark synced patterns.
  • Android's native inserter has no Patterns section, so only iOS is affected.
  • Related, unverified: the "Reusable blocks" tab (core's reusable inserter category) also lists unsynced patterns, and inserts them as references. Check what WP Admin's inserter shows before changing that.
Environment info

GutenbergKit trunk (5f799a1f), iOS demo app with the native inserter enabled, iPhone 18 Pro simulator (iOS 27.1), local WordPress site. WordPress-iOS enables the native inserter by default.

Please confirm that you have searched existing issues in the repo.
  • Yes
Dominant language
JavaScript
Stars
29
Forks
6
Avg merge
2d 1h
Merged PRs (30d)
76

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wordpress-mobile/GutenbergKit

All issues in wordpress-mobile/GutenbergKit

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.